• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

[Trigger] GUI Need help with some trigger

Status
Not open for further replies.
Level 24
Joined
Jun 16, 2008
Messages
1,939
Hi I am working on my new map and just started with the first hero! since i am to dumb to use jass and I don't use to be an expert on GUI I just can't help this trigger!
I use a windwalk wich also gives a passive transperency. But everytime i cast windwalk the transeperency effect gets lost after the duration of the skill expires. So in fact i tried to re-add the effect after each use....and it doesnt work.
Need ur help!!
Here is the trigger:

  • Shadow Walk
    • events
      • unit - A unit learns an ability
    • conditions
      • (Learned Hero Skill) equal to Shadow Walk
    • actions
      • Animation - Change (Learning Hero)'s vertex coloring to (100.00%, 100.00%, 100.00%) with ((Real((Level of Shadow Walk for (Learning Hero)))) x 20.00)% transparency
this is simple. i just add the transperency when the hero learns the skill.
but it vanishs when i cast shadow walk.
so i made this additional trigger:

  • Shadow Walk Transperency
    • events
      • unit - A unit starts the effect of an ability
    • conditions
      • (ability being cast) is equal to shadow walk
    • actions
      • Set temp_caster = (Triggering unit)
  • [first i did it with another trigger wich activates after this so i stored triggering unit in a variable. i dont have to do this in this trigger, i know ;)]
    • Wait until ((temp_caster has buff Shadow Walk ) unequal to True), checking every 0.10 seconds
    • Animation - Change temp_caster's vertex coloring to (100.00%, 100.00%, 100.00%) with ((Real((Level of Shadow Walk for temp_caster))) x 20.00)% transparency
    • Custom script: set udg_temp_caster = null

it doesnt work either...
hope u can help me
 
Level 12
Joined
Jun 28, 2008
Messages
688
Well I can see your problem right in that second trigger. You're checking if the unit has the buff then setting its transparency based on that. The problem with doing this is that the Wind Walk resets transparency after the duration is up, because it sets transoarency as soon as you cast it. You tried a away around this by checking if the unit has the buff but this doesn't work because the Wind Walk spell removes the buff before it resets transparency.

Solution:

Make a trigger with the event "Every 0.5 seconds of game time". This is going to run no matter what buffs the unit has.

Make a condition "Level of (Shadow Walk) for (Caster_Variable) is greater than 0" (This is an indirect form of checking if a unit has an ability or not.)

Finally make your action setting the transparency of Caster_Variable. You will need to set the value of Caster_Variable when the hero learns the ability.
 
Status
Not open for further replies.
Top