Home   Help Search Login Register  

Author Topic: detect if vehicle is disabled/doesn't move  (Read 1395 times)

0 Members and 1 Guest are viewing this topic.

BronzeEagle

  • Guest
detect if vehicle is disabled/doesn't move
« on: 11 Dec 2004, 19:05:43 »
whats the condition to detect if the vehicle can't move anymore or is flat.  Not really disabled but its speed has reached zero.  I need a condition that says if the vehicle speed has reached zero.  I want the losing terms based on that condition.  

I'm doing a chase scene and I need losing terms if you bust a tire or if you cause the enemy to bust theirs.  You just need to keep up with them so they can guide you somewhere.  
« Last Edit: 11 Dec 2004, 19:06:51 by BronzeEagle »

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:detect if vehicle is disabled/doesn't move
« Reply #1 on: 11 Dec 2004, 19:08:07 »
canmove vehicle will return true or false based on whether it is able to move
or for the velocity reaching 0:
?velocity vehicle == [0,0,0]

BronzeEagle

  • Guest
Re:detect if vehicle is disabled/doesn't move
« Reply #2 on: 11 Dec 2004, 19:12:36 »
I'm going to try to use that vehicle velocity code in the condition field like:

condition:  ?velocity vehicle == [0,0,0]

would that be right?

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:detect if vehicle is disabled/doesn't move
« Reply #3 on: 11 Dec 2004, 19:25:34 »
if its in a trigger then get rid of the ? but yes thats right

BronzeEagle

  • Guest
Re:detect if vehicle is disabled/doesn't move
« Reply #4 on: 11 Dec 2004, 20:21:28 »
well i tried the options the command reference gave me and they don't work.  both stopped unitname command and the speed = unit name command.  That just sux.  I' also tried it without the question mark.  Is it possible you could try something for me that you've tested and proven true?  

Offline OFPfreak

  • Members
  • *
  • Who is da operation flashpoint freak now, freak?!
    • OFP NFS mod
Re:detect if vehicle is disabled/doesn't move
« Reply #5 on: 11 Dec 2004, 20:54:59 »
hey man u should make like a carbomb mission and ure not allowed to stop till some kind of 1 magicall bullet disables it likes this:
;please enter a name for your car called vehiclename or change ;the word vehicle name to something else in this script
vehiclename=_this select 0
 
Code: [Select]
;if the car stops it explodes while you have 5 seconds to accelerate
hint "you have 5 seconds to accelerate or be blown to hell!"
~5
?velocity vehicle == [0,0,0] [carname setdammage 1 ; hint "raraaaaagh!!!!"]


hint "keep going for another 50 more seconds!!"
~60
carname setfuel 0
carname setdammage 0.9
?dammage vehicle == 0.9  [?velocity vehicle == [0,0,0]
carname setdammage 0
hint  "we made it thanks to our great driver!"

Im not sure ok.. sorry if this is totally wrong im learning scricpting right now.. thanks for atleast trying  :P
« Last Edit: 11 Dec 2004, 20:56:50 by OFPfreak »
ofp nfs REBORN! All new nitro, neon, customized cars, off-road, on-road, rally, bikes, racer models and more!
ofp nfs's homepage

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:detect if vehicle is disabled/doesn't move
« Reply #6 on: 11 Dec 2004, 21:04:16 »
i think for what you are doing you should use canmove

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:detect if vehicle is disabled/doesn't move
« Reply #7 on: 11 Dec 2004, 21:36:33 »
Quote
?velocity vehicle == [0,0,0]
This is wrong...

Should be
Code: [Select]
(velocity vehicle select 0) == 0 && (velocity vehicle select 1) == 0 && (velocity vehicle select 2) == 0You can't check array as a whole, only element by element...


Also, if checking whether speed of the vehicle is 0 use speed vehicleName == 0

But when checking if the vehicle is immobilized it is very reasonable to use
Code: [Select]
!canMove vehiclenameThat means that whenever that vehicleName becomes immobilized the trigger activates...
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

BronzeEagle

  • Guest
Re:detect if vehicle is disabled/doesn't move
« Reply #8 on: 11 Dec 2004, 21:46:00 »
I figured it out guys.  It's cool.  Situation handled.  For secrecy purposes I can't tell you how.        
« Last Edit: 11 Dec 2004, 21:47:32 by BronzeEagle »

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:detect if vehicle is disabled/doesn't move
« Reply #9 on: 12 Dec 2004, 01:35:53 »
and why not?

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:detect if vehicle is disabled/doesn't move
« Reply #10 on: 12 Dec 2004, 10:56:54 »
;D
My thoughts exactly...

EDIT:
I seriously doubt that there's any new and secret way of detecting if a vehicle is reached a speed of 0, or is immobilised etc... ::)
« Last Edit: 12 Dec 2004, 10:59:35 by HateR_Kint »
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline 456820

  • Contributing Member
  • **
Re:detect if vehicle is disabled/doesn't move
« Reply #11 on: 12 Dec 2004, 17:09:09 »
if you want the vechile not to move use "(not canmove vechile name)" if you want it on more than one vechile just put " and " between each code

BronzeEagle

  • Guest
Re:detect if vehicle is disabled/doesn't move
« Reply #12 on: 13 Dec 2004, 04:41:24 »
I just don't want to say why i needed it.  The story is a big secret going with an addon that hasn't been released yet.