Posted: Fri Sep 20, 2013 6:58 am Post subject:
Follows ID via Trigger
How about enhancing trigger/scripts/actions whatever is best, and allow to set "Follows ID" during game for certain units?
It would be nice to be able to spawn new train reinforcements and then have them connect.
Since it's probably hard to get the ID of a unit during runtime or to specify that in the trigger/script/action, maybe it would work better using a teamtype.
e.g.
[Trainscript]
Name=Locomotive connecting with wagon
0=99,WagonTaskForce
99 is just a new ID that is used for this special behaviour and connects the unit of that script with the unit of the specified taskforce.
Maybe someone has an easier better idea how this could be implemented. _________________ SHP Artist of Twisted Insurrection: Nod buildings
Depending on whether reinforcements should be connected as train, or whether some units that might be on the map or not at the time the action fires.
Generally, it would be relatively easy to create a train when all units are to be created (though it might be hard to put it on the map). It would be harder to connect arbitrary units on the map, because this way would be very error prone and not that deterministic).
For example, having a train move to waypoint X is easy, and it is easy to connect it to a unit in its proximity (cell neighbours, preferrably on track tiles). There is no way to guarantee that unit be there. Let's say, the train wants to dock to three preplaced waggons. the waypoint X is in front of them. Now the first waggon gets destroyed in a freak accident. No way to dock, so there must be a mechanism to circumvent that (like move the train one more cell, until it hits something). But what if all three waggons were destroyed? Have the train search until it arrives in the next station? And what if the first waggon was destroyed and a tank was positioned in its place?
However the solution to this looks, connecting units should be pretty straightforward, but the unit ID has to be inferred by unit position, not by number. _________________ QUICK_EDIT
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum