I've been thinking about how to teleport units around the map. The question comes up because event TELEPORT can cause some weird results, and just disbanding a unit and creating a new one at the new location won't take across any veteran status. So I've had this idea and wondered if it would work in SLIC. Maybe Locutus can shed some light?
Here's the basics of the code anyways:
By my thoughts, this should work because all you are doing is redefining the units location property to what you want and then refreshing the screen so the unit icon pops up in it's new location. Can anyone see any problems with this theory?
------------------
Author of Diplomod. The mod to fix diplomacy.
Rommell to a sub-commander outside Tobruk: "Those Australians are in there somewhere. But where? Let's advance and wait till they shoot, then shoot back."
<font size=1 face=Arial color=444444>[This message has been edited by Dale (edited February 07, 2001).]</font>
Here's the basics of the code anyways:
Code:
location_t tmploc; unit_t tmpunit; tmpunit = (unit you want to 'teleport'); // Define desired unit to 'teleport'. // // Routine to find desired location to 'teleport' to. // In withdraw mod I use a 50 loop RandomNeighbor loop // to find a desired spot. // Define desired spot as tmploc // tmpunit.location = tmploc; // Define location of unit to desired location. // // End with whatever the command is to refresh the screen.
------------------
Author of Diplomod. The mod to fix diplomacy.
Rommell to a sub-commander outside Tobruk: "Those Australians are in there somewhere. But where? Let's advance and wait till they shoot, then shoot back."
<font size=1 face=Arial color=444444>[This message has been edited by Dale (edited February 07, 2001).]</font>
Comment