EDIT: Ok, I already figured out how to do a lot of the stuff below. My question changes to: How do I detect a stop command being given to a unit? And on a side note, is there another way other than using a building's rallypoint to pass that building a position on the map?
First of all, I'm not sure this is the right forum, but there doesn't appear to be a modding subforum here, so apologies if this is in the wrong place.
Basically, I've got the QG to order a teleport on behalf of a unit:
- Code:
WarpNearbyUnits = function(self, radius)
<some code>
for k, v in nearbyunits do
v:OnTeleportUnit(myteleporter, warplocation, v:GetOrientation())
end
end
But the problem comes in that I can't cancel it - the teleporting unit will insist on doing the teleport, and putting a major drain on my economy for all that time, even if I change my mind. Interestingly, when holding shift no purple line appears to indicate a teleport, so the unit clearly doesn't recognise it's been given a teleport order.
A bit of searching leads me to believe there'll be no luck in actually ordering a teleport the way the game does it the rest of the time (so it accepts a cancel in the usual way), so I guess the next best thing is some sort of script that checks for a stop command and tells the teleport to stop if it receives one.
My question is: Is this possible, and if so how, or am I out of luck?Statistics: Posted by Kel — 28 Nov 2012, 22:10
]]>