Home   Help Search Login Register  

Author Topic: How to detect if vehicle engine hit?  (Read 1296 times)

0 Members and 1 Guest are viewing this topic.

Offline Sniperator

  • Members
  • *
How to detect if vehicle engine hit?
« on: 28 Dec 2008, 13:06:01 »
Greetings,

I am making a mission where one of the objectives is to immobilize a vehicle. Is there a way to detect if a bullet has hit the engine of a vehicle?

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: How to detect if vehicle engine hit?
« Reply #1 on: 28 Dec 2008, 13:15:27 »
You can do this much easier by using the canMove command: this command returns whether or not the vehicle in question is capable of moving (i.e., has it been immobilized or not?) ->

trigger on activation: !canMove vehicleName1

vehicleName1 being the name of the vehicle, the "!" meaning "not". Good luck!

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline Sniperator

  • Members
  • *
Re: How to detect if vehicle engine hit?
« Reply #2 on: 28 Dec 2008, 13:31:08 »
I know that will work, but a sniper would target the engine. I think CanMove will only detect if the wheels are hit.
« Last Edit: 06 Jan 2009, 03:12:38 by Sniperator »

Offline Deadfast

  • Members
  • *
Re: How to detect if vehicle engine hit?
« Reply #3 on: 28 Dec 2008, 14:09:57 »
No, canMove works only with armored vehicles (those that have engine hitpoint).

Any other vehicle does not have engine specified.



The only other way I can think of is detecting the proximity of the bullet to the front of the car (where engine is located).

Offline Tyger

  • Former Staff
  • ****
  • I was at OFPEC when it still had dirt floors...
    • OFPEC
Re: How to detect if vehicle engine hit?
« Reply #4 on: 30 Dec 2008, 02:42:40 »
The canMove command works with any vehicle, including cars, pick ups, etc. Not just armor.
You can verify this in game.

Also, can move detects the damage value of the vehicle as well as the wheels/tracks. Therefore, a vehicle can trigger a !(canMove vehicle) check if you damage the vehicle while ensuring not to target the wheels or tracks. Usually though, if the vehicle is not already destroyed when the canMove triggers, the attrition due to damage will quickly cause it to become destroyed.
« Last Edit: 30 Dec 2008, 02:46:12 by Tyger »
"People sleep soundly at night only because rough men stand ready to do violence on their behalf." - George Orwell

MSG Mike Everret - We Will Never Forget - '75-'08