• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Help with Idea...

Status
Not open for further replies.
Level 1
Joined
Mar 2, 2010
Messages
5
ok i have a concept by as far as i try, i can't create it ....:cry:

the concept is come from the movie just i saw "how to train your Dragon"
ireally think that the nightfury fireball is so ... COLL:wink:

the concept is like:
when a 'flying unit' cast spell 'fireblast' to enemy.
make the unit fly pass trought the target with very high speed and add exploding effect to the target also deal damage.

the problem is i cannot create the unit fly in speed like 1000+, all i do is just move it instantly to the back of target, and add the effect. can anybody help me ...:zip:

all i do is to make the flying unit flight with incredible speed then he blast of his target.
 
Level 1
Joined
Mar 2, 2010
Messages
5
yeah.. it works ... but i don't know what is the reason because if i wait the trigger like :
for integer a 1 - 10
loop
move unit to .....
wait 0.01 second

it cause the unit move but laggy because it move step by step and the interval time is not right 0.01 second .

but if i make it on another trigger using periodic event it work.
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Yeah, don't use waits.

Add the unit to a unit group when the effect begins.

The use something like this:

  • Events
    • Time - Every 0.03 seconds of game time
  • Conditions
  • Actions
    • Unit Group - Pick every unit in Dragon_Group and do (Actions)
      • Loop - Actions
        • Set Temp_Unit_1 = (Picked unit)
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Temp_Unit_1 is alive) Equal to True
          • Then - Actions
            • Set Temp_Real_3 = (Load (Key angle) of (Key (Picked unit)) from Dragon_Hash)
            • Set Temp_Real_4 = (GetUnitX(udg_Temp_Unit_1) + (*some moving speed* x (Cos(Temp_Real_3))))
            • Set Temp_Real_5 = (GetUnitY(udg_Temp_Unit_1) + (*some moving speed* x (Sin(Temp_Real_3))))
          • Else - Actions
            • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in Dragon_Hash
            • Unit Group - Remove Temp_Unit_1 from Dragonl_Group
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Dragon_Group is empty) Equal to True
              • Then - Actions
                • Trigger - Turn off (This trigger)
              • Else - Actions
You need to save the angle to a hashtable before adding the unit to a unit group:
  • Hashtable - Save Temp_Real_2 as (Key angle) of (Key (Picked unit)) in Dragonl_Hash
Temp_Real_2 can be the angle from spawn point to position of the target unit.

And initialize the hashtable at map initialization trigger:
  • Melee Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set Dragon_Hash = (Last created hashtable)
You also need to have something that removes the unit from the unit group.
 
Level 1
Joined
Mar 2, 2010
Messages
5
Yeah, don't use waits.

Add the unit to a unit group when the effect begins.

The use something like this:
yes i do that.

You need to save the angle to a hashtable before adding the unit to a unit group:
  • Hashtable - Save Temp_Real_2 as (Key angle) of (Key (Picked unit)) in Dragonl_Hash
Temp_Real_2 can be the angle from spawn point to position of the target unit.

i save into variable type as point, so i don't use hash table.
because i dont know what is hashtable and how to use it ?

if there are 2 unit use this spell, this cause my variable change to the second user point, so there only one unit can use this ability in a time. does hashtable prevent this ?

and yes clear the group after using it like this algorithm, i use :
set group
turn on move_trigger
wait 0.09 second
turn off move_trigger
clear group.
 
Level 1
Joined
Mar 2, 2010
Messages
5
hmmm i just see your lich king spell pack .. all of them are awesome, however i'm also already creating lich king, but with different spell... and i think all the skill not MUI and have many leak. maybe ill upload to your for see, i need your review for bug's and leak.
 
Status
Not open for further replies.
Top