xoxdragonxox
New Member
- Reaction score
- 1
I have a trigger that i would like to be made in JASS because Jass runs smoother and better not vjass i dont use NewGen and I'd really, and i mean really appreciate it if anyone could redo this in jass and not use hashtables please, Im pretty sure this can be done without hashtables!
Trigger:
- On and Off
- Events
- Unit - A unit Uses an item
- Conditions
- (Item-type of (Item being manipulated)) Equal to FollowFootman
- Actions
- Item - Remove (Item being manipulated)
- Set T_Angle = (Facing of (Triggering unit))
- Set T_Loc = (Position of (Triggering unit))
- Set T_Loc2 = (T_Loc offset by 500.00 towards T_Angle degrees)
- Unit - Create 1 footman for (Owner of (Triggering unit)) at T_Loc2 facing T_Angle degrees
- Set T_Light = (Last created unit)
- Unit - Turn collision for T_Light Off
- Unit Group - Add (Triggering unit) to T_Holders
- Hashtable - Save Handle OfT_Light as (Key light) of (Key (Triggering unit)) in T_Hashtable
- Hashtable - Save T_isOn as (Key boolean) of (Key (Triggering unit)) in T_Hashtable
- Custom script: call RemoveLocation (udg_T_Loc)
- Custom script: call RemoveLocation (udg_T_Loc2)
- Events
Trigger:
- Move
- Events
- Time - Every 0.04 seconds of game time
- Conditions
- (Number of units in T_Holders) Greater than 0
- Actions
- Unit Group - Pick every unit in T_Holders and do (Actions)
- Loop - Actions
- Set T_Angle = (Facing of (Picked unit))
- Set T_Loc = (Position of (Picked unit))
- Set T_Loc2 = (T_Loc offset by 500.00 towards T_Angle degrees)
- Set T_Light = (Load (Key light) of (Key (Picked unit)) in T_Hashtable)
- Unit - Move T_Light instantly to T_Loc2
- Custom script: call RemoveLocation (udg_T_Loc)
- Custom script: call RemoveLocation (udg_T_Loc2)
- Loop - Actions
- Unit Group - Pick every unit in T_Holders and do (Actions)
- Events