Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: shiva2552 on April 13, 2010, 01:02:45 pm

Title: Ship lock
Post by: shiva2552 on April 13, 2010, 01:02:45 pm
I'm sorry, can you please tell me how to completely restrict a ship from movement and later "unlock" it so it can move again?

Thanks.  :)
Title: Re: Ship lock
Post by: Angelus on April 13, 2010, 01:25:43 pm
I'm sorry, can you please tell me how to completely restrict a ship from movement and later "unlock" it so it can move again?

Thanks.  :)

Already replied in the IRC chat, but...

Set subsystem strength to 0 ( of the engines, weapons...) for a player ship, and then set it back again to 100, if you want to unlock.
The problem might be that the players ship is already damaged by that time, so you want to store the value in a variable, and use to restore it to that value again.

Play dead for AI, or above mentioned method.
Title: Re: Ship lock
Post by: FUBAR-BDHR on April 13, 2010, 03:50:33 pm
Or just use player-use-ai and give play dead orders.  Doesn't damage the engines if they are destroyable subobjects.
Title: Re: Ship lock
Post by: Colonol Dekker on April 13, 2010, 05:55:52 pm
What FUBAR said. :)
Title: Re: Ship lock
Post by: shiva2552 on April 14, 2010, 08:08:36 am
Alright, I did it. Thanks a lot  ;)