Basically I want to set a command, where the game records all movments and actions that a player makes with a given unit, and is then able to make a copy of the unit that will exactly replay all the movments and actions the player took on command.
I'm looking to do somthing a bit more complex then that. It is more of a record/replay functionality. It would be too complex for someone to spell out but any tips/trick to speed up the process would be great.
What you're trying to do is a very complicated system, jstoffer.
You'd first need a variable like ReplayUnitInt. It is an array with the scope of max units in map needing to be recorded.
Then you'd need a variable for units, ReplayUnit. Captures the unit.
Then you'd need a variable like ReplayCommand. This variable is a 2d array and will record every movement. This would capture the unit's commands.
You should be able to figure out the rest from here, if you still need help... I might suggest trying to replay a single unit on a test map. Replay one of it's moves, then work towards 5, then work towards infinite amount of moves. From there, work on multiple units with infinite move records.
I'd make an array of records, where the record contains the unit, the order string, the order location/unit, and the game time when the order was issued. The array would have to be pretty big since I'm not sure if you can make a resizing array or vector.
When the order is given, simply record it in the next unused array record. That way, the orders will be stored chronologically, and when you want to retrieve them when reading it, you only need to read through the array one index at a time. Do this by looking at the game time of the next order on the list, and waiting until that time has been reached (might need to be compared to a timer's duration instead of the game time, come to think).
Edit: You might also need to include an integer in the record representing order type. For example, 0 for order with no target, 1 for order targeting a point, and 2 for order targeting a unit. Then you can just query that to know which action to use.
Basically I want to set a command, where the game records all movments and actions that a player makes with a given unit, and is then able to make a copy of the unit that will exactly replay all the movments and actions the player took on command.
@jstoffer: Go
Use the event "A unit is issued an order" then use the action "Issue Order to Unit"
@Enexy: Go
I'm looking to do somthing a bit more complex then that. It is more of a record/replay functionality. It would be too complex for someone to spell out but any tips/trick to speed up the process would be great.
@jstoffer: Go
he just did..... you record the actions to bank....
if you cant figure that out .... then you should prolly give up on the idea or scale it down to something within your grasp
either write up some sample logic of step by step how your gonna go about it....
then have people look it over....
give you tips....
then implement it....
@SouLCarveRR: Go
What you're trying to do is a very complicated system, jstoffer.
You'd first need a variable like ReplayUnitInt. It is an array with the scope of max units in map needing to be recorded.
Then you'd need a variable for units, ReplayUnit. Captures the unit.
Then you'd need a variable like ReplayCommand. This variable is a 2d array and will record every movement. This would capture the unit's commands.
You should be able to figure out the rest from here, if you still need help... I might suggest trying to replay a single unit on a test map. Replay one of it's moves, then work towards 5, then work towards infinite amount of moves. From there, work on multiple units with infinite move records.
I'd make an array of records, where the record contains the unit, the order string, the order location/unit, and the game time when the order was issued. The array would have to be pretty big since I'm not sure if you can make a resizing array or vector.
When the order is given, simply record it in the next unused array record. That way, the orders will be stored chronologically, and when you want to retrieve them when reading it, you only need to read through the array one index at a time. Do this by looking at the game time of the next order on the list, and waiting until that time has been reached (might need to be compared to a timer's duration instead of the game time, come to think).
Edit: You might also need to include an integer in the record representing order type. For example, 0 for order with no target, 1 for order targeting a point, and 2 for order targeting a unit. Then you can just query that to know which action to use.