Hello, I have a unit that has the Medivac load/unload ability... I have taken the ability off the command card because I don't want the player to load/unload manually, this is all done with triggers. Problem is that the user can still click on the unit icon in the cargo hold to unload the unit. Does anyone have any idea how to disable that?
If you need it to do this for a cinematic or scripted drop off or something, you can use a trigger action to make the unit uncommandable/commandable or set the Uncommandable flag in the unit properties. You should still be able to control the unit with triggers.
I guess that means you'd have to fiddle around with a Buff behavior that disables the load/unload ability? I don't know if that would then preserve units in cargo, or drop them immediately, or kill them, etc... but I suppose you could also set a trigger to move units from the cargo of the unit into an area somewhere else... maybe making the "transported" no longer visible or uncommandable, etc, till you need them dropped. Do they actually need to be transported, or is it mostly just for story reasons?
I don't have access to the Editor right now; but can you:
Trigger: add behavior to cargo on load event
behavior: makes unit uncommandable
Trigger: remove behavior on unloading
I just did something similar to this (disabling/enabling weapons when loading/unloading) the other night and noticed that behaviors seem to be able to modify a unit in almost any way imaginable.
Also, if I remember right there's a data element for being able to display cargo units; again, not with an editor at the moment, but I am fairly certain it was in there.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hello, I have a unit that has the Medivac load/unload ability... I have taken the ability off the command card because I don't want the player to load/unload manually, this is all done with triggers. Problem is that the user can still click on the unit icon in the cargo hold to unload the unit. Does anyone have any idea how to disable that?
Thanks!
If you need it to do this for a cinematic or scripted drop off or something, you can use a trigger action to make the unit uncommandable/commandable or set the Uncommandable flag in the unit properties. You should still be able to control the unit with triggers.
@Chroyst: Go
The cargo carrying unit is controllable by the player during gameplay, so the commandable/uncommandable trick won't cut it. :(
I guess that means you'd have to fiddle around with a Buff behavior that disables the load/unload ability? I don't know if that would then preserve units in cargo, or drop them immediately, or kill them, etc... but I suppose you could also set a trigger to move units from the cargo of the unit into an area somewhere else... maybe making the "transported" no longer visible or uncommandable, etc, till you need them dropped. Do they actually need to be transported, or is it mostly just for story reasons?
I don't have access to the Editor right now; but can you: Trigger: add behavior to cargo on load event behavior: makes unit uncommandable
Trigger: remove behavior on unloading
I just did something similar to this (disabling/enabling weapons when loading/unloading) the other night and noticed that behaviors seem to be able to modify a unit in almost any way imaginable.
Also, if I remember right there's a data element for being able to display cargo units; again, not with an editor at the moment, but I am fairly certain it was in there.