- Joined
- Sep 22, 2012
- Messages
- 90
happy new year folks,
I know the concept of using muis, it is all about using skills free from errors due to spamming, owner of dummy and damage apply etc etc. I have read this stuff
(http://www.thehelper.net/threads/gui-mui-system.49919/)and decided to make my own mui spell. Its a spell in which a units comes within the area of the created wall then move them away. here's it:
reference spell: elune arrow
I know the concept of using muis, it is all about using skills free from errors due to spamming, owner of dummy and damage apply etc etc. I have read this stuff
(http://www.thehelper.net/threads/gui-mui-system.49919/)and decided to make my own mui spell. Its a spell in which a units comes within the area of the created wall then move them away. here's it:
-
reqwallinit
-
Events
- Unit - A unit Finishes casting an ability
-
Conditions
- (Ability being cast) Equal to /req_wall
-
Actions
- Set forcewall_init_loc = (Position of (Casting unit))
- Set forcewall_angle_init = (Facing of (Casting unit))
- Set forcewall_target_loc = (forcewall_init_loc offset by -300.00 towards forcewall_angle_init degrees)
-
For each (Integer forcewall_init_cycle) from -3 to 3, do (Actions)
-
Loop - Actions
- Set forcewall_index = (forcewall_index + 1)
- Set forcewall_create_angle = (((Real(forcewall_init_cycle)) x 4.65) + forcewall_angle_init)
- Set forcewall_create_loc = (forcewall_target_loc offset by 600.00 towards forcewall_create_angle degrees)
- Set forcewall_duration[forcewall_index] = 0.00
- Unit - Create 1 _req_force for (Owner of (Casting unit)) at forcewall_create_loc facing Default building facing degrees
- Unit - Set the custom value of (Last created unit) to forcewall_index
- Unit Group - Add (Last created unit) to forcewall_walls
- Custom script: call RemoveLocation(udg_forcewall_create_loc)
- Set forcewall_create_angle = 0.00
-
Loop - Actions
- Custom script: call RemoveLocation(udg_forcewall_target_loc)
- Set forcewall_angle_init = 0.00
- Custom script: call RemoveLocation(udg_forcewall_init_loc)
- Trigger - Turn on reqwallloop <gen>
-
Events
-
reqwallloop
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
-
Unit Group - Pick every unit in forcewall_walls and do (Actions)
-
Loop - Actions
- Set forcewall_cur_wall = (Picked unit)
- Set forcewall_primer = (Custom value of forcewall_cur_wall)
- Set forcewall_cur_wall_loc = (Position of forcewall_cur_wall)
- Set forcewall_duration[forcewall_primer] = (forcewall_duration[forcewall_primer] + 0.03)
- Set forcewall_cur_targets_grp = (Units within 60.00 of forcewall_cur_wall_loc)
-
Unit Group - Pick every unit in forcewall_cur_targets_grp and do (Actions)
-
Loop - Actions
- Set forcewall_cur_target = (Picked unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (forcewall_cur_target belongs to an enemy of (Owner of forcewall_cur_wall)) Equal to True
- (forcewall_cur_target is alive) Equal to True
- (forcewall_cur_target is A structure) Not equal to True
-
Then - Actions
- Set forcewall_cur_target_loc = (Position of forcewall_cur_target)
- Set forcewall_target_angle = (Angle from forcewall_cur_wall_loc to forcewall_cur_target_loc)
- Set forcewall_cur_target_to_loc = (forcewall_cur_target_loc offset by 5.00 towards forcewall_target_angle degrees)
- Unit - Move forcewall_cur_target instantly to forcewall_cur_target_to_loc
- Custom script: call RemoveLocation(udg_forcewall_cur_target_to_loc)
- Set forcewall_target_angle = 0.00
- Custom script: call RemoveLocation(udg_forcewall_cur_target_loc)
- Else - Actions
-
If - Conditions
- Custom script: set udg_forcewall_cur_target = null
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- forcewall_duration[forcewall_primer] Greater than or equal to 5.00
-
Then - Actions
- Unit - Add a 0.01 second Generic expiration timer to forcewall_cur_wall
- Unit Group - Remove forcewall_cur_wall from forcewall_walls
- Else - Actions
-
If - Conditions
- Custom script: call DestroyGroup (udg_forcewall_cur_targets_grp)
- Custom script: call RemoveLocation(udg_forcewall_cur_wall_loc)
- Custom script: set udg_forcewall_cur_wall = null
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in forcewall_walls) Equal to 0
-
Then - Actions
- Game - Display to (All players) the text: wall sucess end
- Set forcewall_index = 0
- Set forcewall_primer = 0
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
-
Unit Group - Pick every unit in forcewall_walls and do (Actions)
-
Events
reference spell: elune arrow
Last edited: