Although the actual platform/entity movement stuff is all sorted, can only rotate in the Y plane until we get some 3d math package added, I'm wondering what game-play things I need to add.
For example I have a global variable which will be set whenever the player is on a platform, currently storing the entity id (from which the platform name name can be accessed) and player offset on platform. What else would be useful?
Also the platform sequence list can contain an 'h' (or 'H') instruction which just means stop where you are and I need to add a mechanism whereby logic elsewhere can get it started again, maybe a function call specifying the entity id or 'full' name, not sure which would be more useful.
let me explain the 'full' name bit, I plan on the first part of the name specifying the sequence the entity will use, for example "escalator1" but you would name the entity with some other info, "escalator1_A" would mean that this is one of multiple escalators and identified uniquely by the additional 'A' part. "escalator1_A_1 would be the first 'step', "escalator1_A_2" the second etc. Each step would execute the same pattern but starting at a different sequence position, when the step reaches the last sequence it would start back at the beginning so a five step escalator sequence might look like this:
seq1 seq2 seq3 seq4 seq5
{"x50;y50","x50,y50","x50;y50","x50,y50","x50;y50","r"}
The "r" at the end just means transport the step back to the original position of the first step, by hiding the first and last step positions the effect would be a constantly moving escalator.
Other 'instructions' that can occur in a sequence are:
"p" (or "P") - Pause, should be followed by a number denoting the number of seconds to wait e.g. "P5"
"v" (or "V") - Velocity, ditto but this time specifying how long each sequence from now on should take e.g. "v10"
"m" (or "M" - move forwards, number this time in number of units, can be negative if you want to move backwards e.g "M-100"
"s" (or "S" - move sideways, -ve for left +ve for right, by number of units e.g."s-200"
"x","y","z" (or "X","Y","Z") pretty self explanatory
"t" (or "T" - turn by angle, e.g. "T-45" will rotate the entity left by 45 degrees.
Up to five movement instructions can be in each sequence but only one of each kind, for example "v10;x500;y200,z-20,t90" would mean:
in the next 10 seconds move from entity.x to entity.x + 500 units, go up by 200 units, move from entity.z to entity.z -20 and rotes by 90 degrees clockwise. All the movements occurring together!
To do the same thing but one by one it would be: "v5","x500","y200","z-20","t90"
Obviously the first sequence would take 10 seconds and the second would take 20 overall as each individual move takes 5 seconds.
If you don't put an "h" or an "r" at the end then the sequence just starts again so in this case the entity would just disappear into the distance climbing and rotating for ever!
For most game uses on single platforms I would expect the movement sequence to simply return to its start position so for example a platform just going backwards and forwards between to points with a slight pause at the ends would look like:
"x500","p2","x-500","p2" (no need to specify a "v" value as it will just take the default which can be configured in the script)
Hope that all makes sense, if anyone has any suggestions feel free to post them.
Been there, done that, got all the T-Shirts!