- Joined
- Jan 18, 2005
- Messages
- 5,782
After some time, I finally realized a bug in my system. When you load the game, something stops functioning. I discovered that the problem it is in this JASS command:
call GroupPointOrderLocBJ( udg_Battallion[udg_BattallionIndex ], generalOrder, target)
If I use a GUI equivalent, it works, but in this case, custom script code went more handy than GUI action, because I could call the function with generalOrder parameter only without need to create the list of all possible order. It works fine, until I save the game and load it, the units won't follow anymore. Here is the complete trigger
call GroupPointOrderLocBJ( udg_Battallion[udg_BattallionIndex ], generalOrder, target)
If I use a GUI equivalent, it works, but in this case, custom script code went more handy than GUI action, because I could call the function with generalOrder parameter only without need to create the list of all possible order. It works fine, until I save the game and load it, the units won't follow anymore. Here is the complete trigger
-
Battalion order point Copy
-
Events
- Unit - A unit owned by Player 1 (Red) Is issued an order targeting a point
-
Conditions
- (Unit-type of (Ordered unit)) Equal to InfantryCaptain
-
Actions
- Custom script: local real Xmove=GetLocationX(GetOrderPointLoc())
- Custom script: local real Ymove=GetLocationY(GetOrderPointLoc())
- Custom script: local location target=Location(Xmove,Ymove)
- Custom script: local string generalOrder = OrderId2StringBJ(GetIssuedOrderIdBJ())
- Custom script: local integer udg_BattallionIndex = GetUnitUserData(GetOrderedUnit())
- Custom script: call GroupRemoveUnitSimple( GetOrderedUnit(), udg_Battallion[udg_BattallionIndex ] )
- Custom script: call GroupPointOrderLocBJ( udg_Battallion[udg_BattallionIndex ], generalOrder, target)
- Custom script: call GroupAddUnitSimple( GetOrderedUnit(), udg_Battallion[udg_BattallionIndex ] )
-
Events
Last edited: