• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] Help me with this simple spell

Status
Not open for further replies.
Level 3
Joined
Apr 30, 2013
Messages
22
I have an idea of this spell: when cast, casting unit make alot of attack to the target (of course both of them are pause and the attack is just animation) when casting unit done, it deal 50x(Hero Level) damages.
I think i know very basic of this type of spell but i cant just make it done.Can someone help me :grin: Thank you

P/S sorry for my English skill. It bad right :ogre_haosis:
 
Level 6
Joined
Aug 31, 2014
Messages
137
not sure if this will work for you have'nt tested

[trigger=trigger]spell name
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to YOURSPELL
Actions
Set hero = (Casting unit)
Set Abilitylevel = (Real((Level of YOURSPELL for hero)))
Set DUMMY2 = (Target unit of ability being cast)
Unit - Pause DUMMY2
Unit - Pause hero
Animation - Play hero's attack animation
Wait 0.50 game-time seconds
Animation - Play hero's attack,slam animation
Wait 0.50 game-time seconds
Animation - Play hero's attack animation
Wait 0.50 game-time seconds
Animation - Play hero's attack,slam animation
Wait 0.50 game-time seconds
Animation - Play hero's attack animation
Wait 0.50 game-time seconds
Animation - Play hero's attack,slam animation
Wait 0.50 game-time seconds
Animation - Play hero's attack animation
Wait 0.50 game-time seconds
Animation - Play hero's attack,slam animation
Wait 0.50 game-time seconds
Animation - Play hero's attack animation
Wait 0.50 game-time seconds
Animation - Play hero's attack animation
Wait 0.50 game-time seconds
Animation - Play hero's attack animation
Wait 0.50 game-time seconds
Animation - Play hero's attack animation
Wait 0.50 game-time seconds
Animation - Play hero's attack animation
Wait 0.50 game-time seconds
Animation - Play hero's attack animation
Unit - Unpause hero
Unit - Unpause DUMMY2
Unit - Cause hero to damage DUMMY2, dealing (level x 50.00) damage of attack type Spells and damage type Normal


[/trigger]


also next time you need something like this go to http://www.hiveworkshop.com/forums/requests-341/ so you dont get bumped :)
 
Last edited:
Level 6
Joined
Aug 31, 2014
Messages
137
Can you loop the animation and waits? Like the condition is a time.

Not very talented with loops ect but i can try need to work on my triggering anyway :)

[trigger=set up]spell name
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to YOURSPELL
Actions
Set hero = (Casting unit)
Set level = (Real((Hero level of hero)))
Set DUMMY2 = (Target unit of ability being cast)
Unit - Pause DUMMY2
Unit - Pause hero
Trigger - Turn on spell name loop <gen>
[/trigger]


[trigger=looping]spell name loop
Events
Time - Every 0.03 seconds of game time
Conditions
Actions
Animation - Play hero's attack animation
Wait 0.01 game-time seconds
Animation - Play hero's attack animation
Wait 0.01 game-time seconds
Animation - Play hero's attack animation
Wait 0.01 game-time seconds
Animation - Play hero's attack animation
Wait 0.01 game-time seconds
Animation - Play hero's attack animation
Wait 0.01 game-time seconds
Animation - Play hero's attack animation
Wait 0.01 game-time seconds
Animation - Play hero's attack animation
Wait 0.01 game-time seconds
Animation - Play hero's attack animation
Wait 0.01 game-time seconds
Animation - Play hero's attack animation
Wait 0.01 game-time seconds
Animation - Play hero's attack animation
Wait 0.01 game-time seconds
Animation - Play hero's attack animation
Wait 0.01 game-time seconds
Animation - Play hero's attack animation
Wait 0.01 game-time seconds
Animation - Play hero's attack animation
Wait 0.01 game-time seconds
Animation - Play hero's attack,slam animation
Unit - Cause hero to damage DUMMY2, dealing (level x 50.00) damage of attack type Spells and damage type Normal
Unit - Unpause hero
Unit - Unpause DUMMY2
Set level = 0.00
Set DUMMY2 = No unit
Trigger - Turn off (This trigger)
[/trigger]


this can probaly be done with out waits..... so if anyone else wants to step up to the plate it would probaly be better unless i can get some advise.
 
Last edited:
Level 3
Joined
Apr 30, 2013
Messages
22
I prefer using the Loop action like "IntegerA from 1 to 10...." but i dont know how to use it
 
Not certain myself either.

Instead of the same 10x actions, use it into this :
  • Loop - For Loop TempInt from 1 to 10
    • Actions
    • Animation - play Hero's attack animation
    • Wait 0.01 seconds
Expect inaccuracy of ~0.27 seconds with waits though. Should have use timer for accuracy, but it shouldn't be seen anyway.

Also, I was thinking that this should use SetUnitPropWindow instead of PauseUnit, but I can't demonstrate it now. FYI, Pause has issues with buffs and some other, from what memory preserves.

The code shown is pseudo code, since I'm not in laptop to see Warcraft 3 currently.
 
Level 6
Joined
Aug 31, 2014
Messages
137
Not certain myself either.

Instead of the same 10x actions, use it into this :
  • Loop - For Loop TempInt from 1 to 10
    • Actions
    • Animation - play Hero's attack animation
    • Wait 0.01 seconds
Expect inaccuracy of ~0.27 seconds with waits though. Should have use timer for accuracy, but it shouldn't be seen anyway.

Also, I was thinking that this should use SetUnitPropWindow instead of PauseUnit, but I can't demonstrate it now. FYI, Pause has issues with buffs and some other, from what memory preserves.

The code shown is pseudo code, since I'm not in laptop to see Warcraft 3 currently.
[trigger=setup]spell name
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to YOURSPELL
Actions
Set hero = (Casting unit)
Set herolevel = (Hero level of (Casting unit))
Set level = (Real((Hero level of hero)))
Set Target = (Target unit of ability being cast)
Unit - Pause DUMMY2
Unit - Pause hero
Trigger - Turn on spell name loop <gen>
[/trigger]


[trigger=loop]spell name loop
Events
Time - Every 0.03 seconds of game time
Conditions
Actions
For each (Integer herolevel) from 1 to 20, do (Actions)
Loop - Actions
Animation - Play hero's attack animation
Wait 0.01 game-time seconds
Trigger - Turn on spell name end <gen>
[/trigger]


[trigger=ending]spell name end
Events
Time - Elapsed game time is 10.00 seconds
Conditions
Actions
Unit - Cause hero to damage Target, dealing (level x 50.00) damage of attack type Spells and damage type Normal
Set level = 0.00
Set DUMMY2 = No unit
Set herolevel = 0
Set Target = No unit
Trigger - Turn off spell name loop <gen>
[/trigger]


this any better not sure what you ment by propwindow
 
Last edited:
Status
Not open for further replies.
Top