- Joined
- Apr 25, 2011
- Messages
- 73
Hi.
I think that this is one of my first posts.
Ok, so what I need help with is making this GUI Trigger into a JASS Trigger...
I wanted to make it only a function with a Loop. But it just lagged too much. And what I know is that you can't pause a Loop.
I also thought of using my Pokeball, in the loop with the GetLastCreatedUnit(). But this seems to be not MUI. (Although if it is MUI, please let me know so I can start making the trigger (I only thought of it)).
If everything here doesn't work please share your ideas. Or maybe it is already on the site. (I didn't find it though)
Also I'm only at JASS, not the complicated vJASS with structs. Or private functions. I am even afraid to use the
thing. Because it made my map unplayable when I tested it. It just opened and then got me to the Warcraft III Menu. Also I tried to open it with Create Game. Didn't work. Just brought me to the Local Area Network over and over again.
My last desperate call: Please help!
(I hope this is the right section, though)
PS: I forgot what I did in this trigger. Hashtables mostly.
I think that this is one of my first posts.
Ok, so what I need help with is making this GUI Trigger into a JASS Trigger...
-
Untitled Trigger 001
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Pokeball Throw
-
Actions
- Set Target_Unit = (Target unit of ability being cast)
- Unit - Create 1 Rifleman for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
- Set Pokeball = (Last created unit)
- Animation - Change Pokeball's animation speed to 500.00% of its original speed
- Unit - Make Pokeball face (Position of Target_Unit) over 0.00 seconds
- Unit Group - Add Pokeball to Pokeball_Group
-
Events
-
Untitled Trigger 003
-
Events
- Time - Every 0.04 seconds of game time
- Conditions
-
Actions
-
Unit Group - Pick every unit in Pokeball_Group and do (Actions)
-
Loop - Actions
- Hashtable - Save (Angle from (Position of Pokeball) to (Position of Target_Unit)) as (Key (Target unit of ability being cast)) of (Key (Triggering unit)) in Pokemon_Hashtable
- Unit - Move Pokeball instantly to ((Position of Pokeball) offset by 20.00 towards (Load (Key (Target unit of ability being cast)) of (Key (Triggering unit)) from Pokemon_Hashtable) degrees)
-
Unit Group - Pick every unit in (Units within 10.00 of (Position of Pokeball)) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Picked unit) Equal to Target_Unit
-
Then - Actions
- Special Effect - Create a special effect at (Position of Target_Unit) using Abilities\Spells\Other\Charm\CharmTarget.mdl
- Special Effect - Destroy (Last created special effect)
- Special Effect - Create a special effect at (Position of Target_Unit) using Pokeball2.mdx
- Special Effect - Destroy (Last created special effect)
- Unit - Change ownership of Target_Unit to (Owner of Pokeball) and Change color
- Unit - Move Target_Unit instantly to (Center of Pokespace[(Player number of (Owner of Pokeball))])
- Unit Group - Remove Pokeball from Pokeball_Group
- Unit - Remove Pokeball from the game
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Loop - Actions
-
Unit Group - Pick every unit in Pokeball_Group and do (Actions)
-
Events
I wanted to make it only a function with a Loop. But it just lagged too much. And what I know is that you can't pause a Loop.
I also thought of using my Pokeball, in the loop with the GetLastCreatedUnit(). But this seems to be not MUI. (Although if it is MUI, please let me know so I can start making the trigger (I only thought of it)).
If everything here doesn't work please share your ideas. Or maybe it is already on the site. (I didn't find it though)
Also I'm only at JASS, not the complicated vJASS with structs. Or private functions. I am even afraid to use the
JASS:
globals
endglobals
My last desperate call: Please help!
(I hope this is the right section, though)
PS: I forgot what I did in this trigger. Hashtables mostly.
Last edited: