• 🏆 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] Trigger does not work

Status
Not open for further replies.
Level 12
Joined
Mar 23, 2008
Messages
942
Well... Seems like every time I try to do a custom spell, I fails...

633317514784490542.jpg


Well, back to the trigger:

  • Blessing
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Blessing (based in channel)
    • Actions
      • Unit - Add Blessing (based in Item Hero Stat Bonus) to (Target unit of ability being cast)
      • Unit - Set level of Blessing (based in Item Hero Stat Bonus) for (Target unit of ability being cast) to (Level of (Ability being cast) for (Triggering unit))
      • Set SpellPoint[0] = (Position of (Target unit of ability being cast))
      • Unit - Create 1 Dummy Caster for (Owner of (Triggering unit)) at SpellPoint[0] facing Default building facing degrees
      • Unit - Order (Last created unit) to Human Priest - Inner Fire (Target unit of ability being cast)
      • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
      • Special Effect - Create a special effect at SpellPoint[0] using Abilities\Spells\Human\Polymorph\PolyMorphDoneGround.mdl
      • Special Effect - Destroy (Last created special effect)
      • Sound - Play FaerieFireLaunch1 <gen> at 100.00% volume, located at SpellPoint[0] with Z offset 0.00
      • Sound - Destroy (Last played sound)
      • Trigger - Turn on Check Blessing <gen>
      • Custom script: call RemoveLocation(udg_SpellPoint[0])
  • Check Blessing
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Game - Display to (All players) the text: This trigger is wor...
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area) matching ((Level of Blessing (based in Item Hero Stat Bonus) for (Picked unit)) Greater than 0)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Blessing (based in wind walk)) Equal to False
            • Then - Actions
              • Unit - Remove Blessing (based in Item Hero Stat Bonus) from (Picked unit)
              • Game - Display to (All players) the text: This trigger did so...
            • Else - Actions
              • Game - Display to (All players) the text: This trigger did no...
The first trigger just make some effects and give to the target of ability the skill Blessing (based in Item Hero stats bonus) that gives +STR and +INT, that spell lasts 40s, after it ends I want the hero to lost the bonus, but the second trigger don't remove the bonus.
And I can't use wait, because you wouldn't be able to recast the buf to renew the time.

Edit: Added a debug message to the trigger, now it only spam "This trigger is working", nothing more...
Edit2: Also, the bonus from the skill does not increase with level.
 
Level 5
Joined
Oct 3, 2008
Messages
104
Unit Group - Pick every unit in (Units in (Playable map area) matching ((Level of Blessing (based in Item Hero Stat Bonus) for (Picked unit)) Greater than 0)) and do (Actions)
^ unit group leak, set variable for that unit group reference and remove it by custom script.

attribute bonus does not level up, u must make a different ability for each level of attribute bonus for it to work. probably add these bonuses into an array and refer to it by the index. setting many level of attribute bonus in the same ability will not work.

((Picked unit) has buff Blessing (based in wind walk)) Equal to False
^ lol where did that come from, shouldnt it be
Unit - Order (Last created unit) to Human Priest - Inner Fire (Target unit of ability being cast)
inner fire?

to solve your problem the solid way, this is wat i normally do for this sort of trigger, abit strange but it works. use an integer variable to count the number of times the trigger has executed. set this number as a custom value for ur blessed unit and your dummy unit at the same time. change ur dummy unit expiration timer to the length of time you want ur bless to stay. remove your whole second trigger and use my awesome one: unit dies, unit = dummy unit, pick unit with same custom value as triggering unit, remove ability
 
Level 12
Joined
Mar 23, 2008
Messages
942
@PoZoR
I'm pretty sure my trigger does not leak.
My inner fire have as buf the "Blessing (based in windwalk)"

I noticed stats can't have different levels, but they stack?
Also, it seems I cannot remove then from the units, or even detect if my unit have them.

--------------------------

@StaberFire

Yes, its just a buf indicator.
I can't use any countdown timer because of that:
- unit cast ability (lasts 40s)
- after 30s the unit cast it again to a friend an go away
- 10s later the skill vanishes :(
 
Level 5
Joined
Oct 3, 2008
Messages
104
i must repeat, unit groups DO LEAK. it is in a sticky thread in this section, check it out.

also, tell me if the blessing actually works in the first place. is ur problem that u cant remove it? or r u unable to bless in the first place.

if all else fails, use the triggering that i told u in my previous post
 
Level 12
Joined
Mar 23, 2008
Messages
942
i must repeat, unit groups DO LEAK. it is in a sticky thread in this section, check it out.

also, tell me if the blessing actually works in the first place. is ur problem that u cant remove it? or r u unable to bless in the first place.

if all else fails, use the triggering that i told u in my previous post
MY trigger does not leak. "set bj_wantDestroyGroup = true"

-----------------

Only to check, I fixed all errors. Solved ^^
 
Level 3
Joined
Feb 13, 2008
Messages
65
If you can explain to me what exactly this spell is meant to do, I'm sure I would be able to help you better.
 
Status
Not open for further replies.
Top