until now ive never needed to use mui so i read a tutorial about it and it works...almost. I based it off of wyrmlords http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/multi-instancible-gui-spell-making-34393/.
as you can see i changed some things to fit my needs (its basically a very simple bullet/shooting system). But it doesnt work. its flawless at first but something happens and all the bullets stop moving. Could anyone take a look please? i think 99% of it is bc i dont fully understand the stystem haha
as you can see i changed some things to fit my needs (its basically a very simple bullet/shooting system). But it doesnt work. its flawless at first but something happens and all the bullets stop moving. Could anyone take a look please? i think 99% of it is bc i dont fully understand the stystem haha
-
Archers
-
Events
- Unit - A unit Is attacked
-
Conditions
- (Unit-type of (Attacking unit)) Equal to Stalker
-
Actions
- Trigger - Run Archer Index <gen> (ignoring conditions)
- Set TempPoint[1] = (Position of (Attacking unit))
- Set TempPoint[2] = (Position of (Attacked unit))
- Unit - Create 1 Arrow for (Owner of (Attacking unit)) at TempPoint[1] facing TempPoint[2]
- Set ArcherUnit[ArcherCurrentIndex] = (Last created unit)
- Set ArcherDistance[ArcherCurrentIndex] = 16.00
- Set ArcherTime[ArcherCurrentIndex] = 500
- Custom script: call RemoveLocation (udg_TempPoint[1])
- Custom script: call RemoveLocation (udg_TempPoint[2])
-
Events
-
Archer Loop
-
Events
- Time - Every 0.04 seconds of game time
- Conditions
-
Actions
-
For each (Integer A) from 1 to 50, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ArcherUnit[(Integer A)] Not equal to No unit
-
Then - Actions
- Set ArcherTime[(Integer A)] = (ArcherTime[(Integer A)] - 16)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ArcherTime[(Integer A)] Greater than 0
-
Then - Actions
- Set TempPoint[2] = (Position of ArcherUnit[(Integer A)])
- Set TempPoint[1] = (TempPoint[2] offset by 16.00 towards (Facing of ArcherUnit[(Integer A)]) degrees)
- Unit - Move ArcherUnit[(Integer A)] instantly to ((Position of ArcherUnit[(Integer A)]) offset by 16.00 towards (Facing of ArcherUnit[(Integer A)]) degrees)
-
Else - Actions
- Set ArcherCurrentIndex = (Integer A)
- Unit - Kill ArcherUnit[(Integer A)]
- Trigger - Run Archer Index Return <gen> (ignoring conditions)
-
If - Conditions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer A) from 1 to 50, do (Actions)
-
Events
-
Archer Index
- Events
- Conditions
-
Actions
- Set ArcherIndex = (ArcherIndex + 1)
- Set ArcherCurrentIndex = ArcherID[ArcherIndex]
-
Archer Index Return
- Events
- Conditions
-
Actions
- Set ArcherID[ArcherIndex] = ArcherCurrentIndex
- Set ArcherIndex = (ArcherIndex - 1)