OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: j-man on 13 Jun 2004, 04:00:26

Title: removing player actions
Post by: j-man on 13 Jun 2004, 04:00:26
Is there a way to remove all actions from a player ??? When the player gets into a chopper, all actions are removed so that he can't eject and stuff like that. And I don't just want to lock the helicopter.
Title: Re:removing player actions
Post by: dmakatra on 13 Jun 2004, 07:18:16
Try the disableuserinput command.

:beat: *Gets Shot* :beat:
Title: Re:removing player actions
Post by: Wadmann on 13 Jun 2004, 07:39:04
Hey j-man!

There is a removeaction command but read up on actions in the pinned topic in the Editing/Scripting: General section (Time for Action or something like that). It could relate to the last post on the first page where they refer to a maninvehicle.hpp (?) or the last page where the actions are listed. The removeaction works on an indexed number that I have never seen a reference to. As per the addaction in the ComRef:

Quote
Action ID should be returned, but due to bug it is not. To determine action ID use following algorithum: first action added to given vehicle has ID zero, next has ID one, ect.

You are on your own from here, I'm afraid. Hopefully a sharper knife in the drawer can pick up where I left off and get this solved for you!

                                                 Wadmann
Title: Re:removing player actions
Post by: macguba on 13 Jun 2004, 11:59:57
removeAction works only on actions added with addAction command.  It does not work (AFAIK) on hard coded actions.

It is unlikely that you can do what you want:  this is not mission design, it is interfering with how the game is played and in general there's no way of doing that.  Armsty's suggestion might work though ... remember to enable it later...

What's the underlying question?   What are you trying to achieve?