Forged Alliance Forever Forged Alliance Forever Forums 2012-12-06T21:14:21+02:00 /feed.php?f=2&t=2468 2012-12-06T21:14:21+02:00 2012-12-06T21:14:21+02:00 /viewtopic.php?t=2468&p=24566#p24566 <![CDATA[Re: Modding question - detecting a stop command]]>
I'm considering a couple of ideas, namely getting the QG to activate an ability on each unit that can call some sort of cancel function, or alternatively getting the QG to simply give the teleport ability to all units in range, both of which I reckon I could code... but they'd take a while and no doubt be bug-filled, so a quicker (and nicer) way of getting it working would be nice!

Statistics: Posted by Kel — 06 Dec 2012, 21:14


]]>
2012-12-04T09:58:29+02:00 2012-12-04T09:58:29+02:00 /viewtopic.php?t=2468&p=24371#p24371 <![CDATA[Re: Modding question - detecting a stop command]]> Statistics: Posted by Lyr — 04 Dec 2012, 09:58


]]>
2012-12-03T21:05:46+02:00 2012-12-03T21:05:46+02:00 /viewtopic.php?t=2468&p=24332#p24332 <![CDATA[Re: Modding question - detecting a stop command]]>
1) How do I detect a stop command being given to a unit?
2) Is there another way other than using a building's rallypoint to pass that building a position on the map?

Statistics: Posted by Kel — 03 Dec 2012, 21:05


]]>
2012-12-02T19:04:31+02:00 2012-12-02T19:04:31+02:00 /viewtopic.php?t=2468&p=24249#p24249 <![CDATA[Re: Modding question - stopping a script-ordered teleport]]> You've probably already checked this avenue though.
What mods are you using for research atm? or are you experimenting and using forums?

Statistics: Posted by NotAsian — 02 Dec 2012, 19:04


]]>
2012-12-01T16:08:44+02:00 2012-12-01T16:08:44+02:00 /viewtopic.php?t=2468&p=24051#p24051 <![CDATA[Re: Modding question - stopping a script-ordered teleport]]> But then how do I tell it where to teleport to? Ain't gonna work.

I think I need to have a function which will detect a stop command, and cause the teleport to fail if it gets one. I just don't know enough to do that, 'tis all.

Statistics: Posted by Kel — 01 Dec 2012, 16:08


]]>
2012-11-30T16:15:21+02:00 2012-11-30T16:15:21+02:00 /viewtopic.php?t=2468&p=24007#p24007 <![CDATA[Re: Modding question - stopping a script-ordered teleport]]> Make sure you remove the ability after teleport fails or succeeds if its possible.

Statistics: Posted by NotAsian — 30 Nov 2012, 16:15


]]>
2012-12-03T21:06:00+02:00 2012-11-28T22:10:57+02:00 /viewtopic.php?t=2468&p=23875#p23875 <![CDATA[Modding question - detecting a stop command]]> 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


]]>