OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Resources Beta Testing & Submission => Topic started by: Blanco on 18 Aug 2005, 05:08:27

Title: Permanent action
Post by: Blanco on 18 Aug 2005, 05:08:27
The problem :

You add an action to the player and once he boards a vehicle the action disappears.
Or you start in a vehicle with an addaction and when you disembark the action is lost again, because the action is attached to the vehicle, not to the owner of the vehicle.

The solution :

Permanent action script, the action follows the player where-ever he might be.
The action will always be there as long as you live.


Params :

1)  The action text (string)
2)  The action script (string)

Example :
Code: [Select]
["Click me","Clickmescript.sqs"] exec "P_action.sqs"
In the demomission the addaction script is just a little debugscript, but that doesn't really matters, it's about the P_action script.

Some notes  :

- Works only with the player (for now)
- Not tested in MP
- Action is not visible when you're hanging on a parachute, I dunno why



Title: Re:Permanent action
Post by: bedges on 19 Aug 2005, 20:31:11
tested, and i can confirm it works a treat. i was trying to replicate the bug 'feature' whereby an exterior action can be repeated in the vehicle boarded, but looking at the script you seem to have taken care of that one ;)

nice work  8)