Advertisement

Author Topic: Permanent action  (Read 610 times)

0 Members and 1 Guest are viewing this topic.

Offline Blanco

  • Former Staff
  • ****
Permanent action
« 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



« Last Edit: 19 Aug 2005, 22:37:25 by Blanco »
Search or search or search before you ask.

Offline bedges

  • Former Staff
  • ****
    • OFPEC The Editing Center
Re:Permanent action
« Reply #1 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)
« Last Edit: 19 Aug 2005, 20:31:39 by bedges »