Home   Help Search Login Register  

Author Topic: Detecting healing on a vehicle, and..  (Read 1374 times)

0 Members and 1 Guest are viewing this topic.

Offline JasonO

  • OFPEC Patron
  • ****
  • Oh no...
    • The New Life RPG
Detecting healing on a vehicle, and..
« on: 17 Aug 2007, 16:53:45 »
I have a vehicle thats created by a person via the action menu on a flag pole, which then create's the vehicle at a position. That's fine. This vehicle is an ambulance vehicle which you can heal at.

I want to run a script when it's created that will check if someone else (other than the player who created it) is using it to heal, if they are then a number variable is increased on the vehicle's creator, and the same amount decreased on the person healing at it. The variable is the same for all units for the amount (it's a money variable).

I have an idea how it would work but how could i make the script global for the 2 units using it, as I think that it will only run on the vehicles creator and therefore won't be able to detect a unit nearby?

I'm totally lost in how global/local scripting works when its something originally local.

Thanks for your help.