Trooper Dan, on 30 November 2015 - 10:52 AM, said:
What you are doing is very nifty and useful. I once talked about doing something similar myself, but then I got lazy. To augment your feature, I would suggest having the mapper tag one of the sprites in the construct as the central pivot point (optional). Then when it moves around, you can use rotatepoint relative to the central sprite to turn the construct appropriately as it is moving along the locators. That would be very good for vehicles.
This is still the area I'm mulling over. At the moment I had thought of using ang as something easy for the mapper to set initial enabled/disabled state, but it might better be used to specify an angle that the collection of sprites should rotate to, gradually rotating as it progresses locator-to-locator. The necessary angle could also be infered from the positions of the locators in the path, in fact that'll probably have to be the way it works since the locators can be moved so paths can dynamically change.
Whatever, a group of sprites are pulled along by a special locator (pal21) and hence the plan is they would rotate around that special locator.
Trooper Dan, on 30 November 2015 - 10:52 AM, said:
What statnums are you using? Some of them have hardcoding that could cause trouble. If you can do it safely, it is efficient. A somewhat less efficient but still manageable solution would be to use gamearrays to hold the IDs of the sprite constructs. Then you would only need to loop through (filled elements of) the arrays, not all the sprites in the map.
To date I've tried to minimise statnum usage.The only statnum I' relying on in-game is 333, which I use to mark activator targets. I'm using 334 as head locator statnum, 335 as general locator statnum but these are only required during initialisation, whereupon they change to 333 if they have "activation"-type functionality or 0.
I dont want to use gamearrays as that would limit the number of paths and/or locators in path - or be a very big array

This way costs just two per-actor gamevars and I reuse those gamevars for other purposes in other effects.
In the prototype, I didn't use statnums but instead a sort of double linked list - it worked but was _way_ overcomplicated. The statnum method of initialisation is a good compromise of processing efficiency and ease of coding.
Trooper Dan, on 30 November 2015 - 10:52 AM, said:
You lost me here. Why can you only link them using ID?
Consider 4 locators in this order : 3, 10, 6, 20. They need to be given the following "psprite" and "nsprite" values
Sprite psprite nsprite
3 -1 10
6 10 20
10 3 6
20 6 -1
How else can, for example, sprite 10 record that it's preceeding locator is sprite 3 ?
TTFN,
Jon