Archived copy of war3source.com, the War3Source forum (2009–2020), rebuilt from the Internet Archive by wc3mods.net. This page was captured on 2016-08-04 (original capture). Forum · All archived topics · Wiki · Bug tracker · Blog

Author Topic: Help With Human Alliance (flickering inv)  (Read 1470 times)

mythos

  • Newbie
  • *
  • Posts: 27
    • View Profile
    • Email
Help With Human Alliance (flickering inv)
« on: August 15, 2014, 05:54:26 PM »
So I am brand new to programming so please be kind. I am trying to give human alliance a nice skill, flickering invisibility.

So far I have this float setup:

new Float:InvisibilityChanceCSGO[7]={1.0,0.40,0.50,0.65,0.70, 0.80, 0.90};

and a little bit of the flickering code:


public ActivateSkills(client)
{
    if(RaceDisabled)
    {
        return;
    }

 if(W3Chance(InvisibilityChanceCSGO[Getskilllevel]))
    {
        SetEntityRenderFx(client, RenderFx:RENDERFX_FLICKER_SLOW);
        PrintToChat(client, "Invisibility: You've successfully used your invisibility skill and are now partially invisible.");
    }
}

Now I think I need to assign it to the already exiting SKILL_INVIS, I tried to initialing do that by putting it here:

War3_AddSkillBuff(thisRaceID, SKILL_INVIS, InvisibilityChanceCSGO, fInvisibilitySkill, GameTF() ? InvisibilityAlphaTF : InvisibilityAlphaCS);

But I think that is wrong as it's an ActivateSkill, not a AddSkill buff. So where do I go from here? This is an idea I had but I am not sure if I am on the right track.

skill_InvisibilityChanceCSGO=war3_GetskillLevel(client,thisRaceID,SKILL_INVIS);

Also I've read through the tutorial a few times and searched around the forums.

Remy Lebeau

  • Sr. Member
  • ****
  • Posts: 488
    • View Profile
    • Seven Sins Gaming
Re: Help With Human Alliance (flickering inv)
« Reply #1 on: August 15, 2014, 08:42:33 PM »
I've attached for you a race called Mr Electric which has a flickering skill - it may be of some help to you.

STEAM PROFILE

NEW CS:GO SERVER:

mythos

  • Newbie
  • *
  • Posts: 27
    • View Profile
    • Email
Re: Help With Human Alliance (flickering inv)
« Reply #2 on: August 15, 2014, 10:27:56 PM »
Definitely helpful thanks.

I am still having a hard time assigning SetEnityRenderfx to SKILL_INVIS. Obviously the code below is wrong, but maybe it will help someone steer me in the right direction.

public InitPassiveSkills( client )
{
 
if(W3Chance(InvisibilityChanceCSGO(War3_GetSkillLevel))
    {
        SetEntityRenderFx(client, thisRaceID, SKILL_INVIS, RenderFx:RENDERFX_FLICKER_SLOW);
        PrintToChat(client, "Invisibility: You've successfully used your invisibility skill and are now partially invisible.");
    }
}

Remy Lebeau

  • Sr. Member
  • ****
  • Posts: 488
    • View Profile
    • Seven Sins Gaming
Re: Help With Human Alliance (flickering inv)
« Reply #3 on: August 16, 2014, 03:11:06 AM »
        SetEntityRenderFx(client, thisRaceID, SKILL_INVIS, RenderFx:RENDERFX_FLICKER_SLOW);


Where did you get that code from?

The sourcemod API ( https://sm.alliedmods.net/api/ - well worth using often)  defines SetEntityRenderFx as:

stock SetEntityRenderFx(entity, RenderFx:fx)

So all you need is something like: SetEntityRenderFx( client, RENDERFX_FLICKER_FAST );

What are you trying to do when linking it to the skill? (ie, what difference do you want the skill being leveled up to do)
STEAM PROFILE

NEW CS:GO SERVER:

mythos

  • Newbie
  • *
  • Posts: 27
    • View Profile
    • Email
Re: Help With Human Alliance (flickering inv)
« Reply #4 on: August 16, 2014, 03:19:41 PM »
Code was my own doing, it's wrong. I am trying to tie it to:
new Float:InvisibilityChanceCSGO[7]={1.0,0.40,0.50,0.65,0.70, 0.80, 0.90};
and the already existing SKILL_INVIS

The idea is an increasing chance to spawn with flickering invis per level.

Remy Lebeau

  • Sr. Member
  • ****
  • Posts: 488
    • View Profile
    • Seven Sins Gaming
Re: Help With Human Alliance (flickering inv)
« Reply #5 on: August 17, 2014, 03:52:16 PM »
I'm away on a conference. Bump this for me on Thursday if no one had replied before then and I'll help.
STEAM PROFILE

NEW CS:GO SERVER:

Ownz

  • Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2428
  • chmod -R 777 *
    • View Profile
    • OwnageClan
Re: Help With Human Alliance (flickering inv)
« Reply #6 on: August 17, 2014, 04:10:42 PM »
if u can get that in a working state for cs go we might as well replace that skill for cs go