HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Controlling a transport's ability to move

08-19-2003, 02:37 AM#1
Trick
Here's a brief description of what I'm trying to accomplish:

1) Start with a transport with cargo size of 1 which cannot move
2) When a unit loads into the transport, it can move
3) When the unit unloads, the transport cannot move

I'm working on #2 and #3 right now, as #3 will become #1...

I can get the transport to stop moving when using the Unload All command. I tried it with Pause, but then I couldn't load a unit into it again. I tried removing the Ability for move (Amov), but when a unit loads I can't get the transport to move again.

I can't get the transport to stop when the player clicks on the unit's portrait in the cargo hold, though. Anyone know the command issued when this occurs?

Any ideas appreciated!
08-19-2003, 01:26 PM#2
Trick
Come on guys... Someone has to have an idea about this one. I'm starting to get a little disheartened with my map ideas...
emote_confused
08-19-2003, 02:56 PM#3
Guest
Have you tried readding Amove... Also you could always just set its movment speed to 0.
08-19-2003, 03:42 PM#4
element_5
The problem with removing AMov is that you can't add it back :/
08-19-2003, 04:27 PM#5
jeffsu
I think setting movement speed to 0 still allows very slow movement...

Ok, you want an idea, here's a really really bad one:

When a unit is loaded, create an invisible unit and order to cast a spell on the transport which stuns it for some huge length of time. When you want to unstun it, create another unit that casts a very brief invulnerabity (which will clear the stun) on it.
08-19-2003, 05:19 PM#6
Trick
Not where I could test this right now, but any idea what would happen if I used Unit-Replace to change out a non-moving transport with a moving version? Would any loaded units just transfer into the new transport? Hmmm...
08-19-2003, 06:17 PM#7
jeffsu
That's a good idea actually -- think of this similar one: You dont ACTUALLY load the unit, but you have a unit variable to hold the unit. When it "boards" the transport, move it somewhere and hide it (you could change the owner temporarily too). When it "unboards" the transport move it to the spot it is supposed to be unloaded. In the meantime, you can be replacing the "transport" with a moving/non-moving unit.

I think that could work.
08-19-2003, 07:14 PM#8
element_5
Yes, that is the workaround I devised when helping out someone else on these boards. I don't know if the cargo is transfered as well, but you could store the loading units in a variable when they're loaded and when you replace the transport, somehow make them load into it.

EDIT: I was refering to the "Unit - Replace" idea
08-19-2003, 07:26 PM#9
Trick
OK, I'll try that this evening then.

Also, anyone know for certain what the command is that's issued when you click on a unit's portrait while in a transport to unload it? Is it simply "unload"?

I think I was watching for either Unload or the Unload ability and it was only firing when you actually clicked Unload and then clicked where you wanted them. It wasn't firing for the portrait click.
08-19-2003, 07:30 PM#10
element_5
Yeah, it's "unload" and when you click on Unload All it's "unloadall"
08-20-2003, 02:20 AM#11
Trick
:(
Grrr! Only one thing's not working. When I initially replace the transport, the game seems to loose the Loading Unit completely for a moment. I can't reference Loading Unit any after the Transporting Unit is replaced. I can't even put Loading Unit into a variable and be able to interact with it!

Gotta be something I'm missing...
08-20-2003, 02:54 AM#12
jeffsu
Don't actually load -- make a custom ability that makes it looks like it's loading, but just move and hide it instead.

Same for unload.
08-20-2003, 03:34 AM#13
Trick
:ggani:
I think I've almost got it! It works right now if the transport Loads the unit, but not if the unit is selected and then right-click on the transport.

Does anyone know what order is issued then, and which unit is the target and the ordered unit?
08-20-2003, 03:46 AM#14
Trick
:D
Woot! Figured it out. Thanks for all the help guys.

The order was "smart". Figured out how to print out the order name over the unit's head. Made that real easy. I love debugging tools!

Now I just have to figure out if the dizzyness will work properly when the transport is destroyed.
08-20-2003, 05:01 AM#15
jeffsu
How did you print the order name?