Home   Help Search Login Register  

Author Topic: Not in car and not alive??  (Read 1076 times)

0 Members and 1 Guest are viewing this topic.

Offline OrnelP

  • Members
  • *
  • "The true battlefield is within"
Not in car and not alive??
« on: 30 May 2006, 21:07:19 »
 :D     Hurrah for the forums being back....now time to overload them again  ;D

1st question.        How do i detect if a loon is NOT in a vehicle, something like Loon in car1 is there a loon not in car1?

2nd question.  In a script how do i detect if a loon is not alive?

Not alive loon goto #end?           please see if you could help thanks...
War is delightful to those who have had no experience of it
- Deciderius Erasmus

Offline Baddo

  • Former Staff
  • ****
  • Reservist Jaeger
Re: Not in car and not alive??
« Reply #1 on: 30 May 2006, 21:55:43 »

1)

Code: [Select]
if ( vehicle player == player ) then { hint "Player is not in any vehicle!" }
will mean that the player is the vehicle of itself, so player is not in a car etc. other vehicle other than "player"

but but but, I understand now that you want to check a specific vehicle like yourJeep:

Code: [Select]
if ( vehicle player != yourJeep ) then { hint "Player is not in yourJeep!" }
If you want to use this in a trigger, then simply write there:

condition: vehicle player != yourJeep
on activation: hint "Player is not in yourJeep!"

2)

Code: [Select]
if ( ! alive player ) then { hint "Player is not alive!" }

Offline OrnelP

  • Members
  • *
  • "The true battlefield is within"
Re: Not in car and not alive??
« Reply #2 on: 31 May 2006, 00:08:18 »
ok, i beleive i understand but what makes this syntax, well, what makes the point? what is the main.  i dont know how to word this but im just gonna type it....                  What makes the player not in car trigger?        how do i know that this means not in car, what would in car be?

Barg! >:(     why do i have to be a computer programmer to play OFP...         command and conquer here i come!!!!!
« Last Edit: 31 May 2006, 01:03:57 by OrnelP »
War is delightful to those who have had no experience of it
- Deciderius Erasmus

Offline Flauta

  • Members
  • *
  • There is no knownledge, that is no power
    • Chek mi FLog
Re: Not in car and not alive??
« Reply #3 on: 31 May 2006, 02:39:51 »
Jojo! another Tarzan English writer!!!!  ;D

Well what I've just undertstand.. its that you want to check if the players is in a vehicle.. and if it is alive or dont... so these things may help you...

Code: [Select]
;If the player is alive and out the "vehicle", quits the script
;exec it as "[Jeep,man] exec "thisscript.sqs"
; where jeep is the veihlce in question, and man.. well.. the man

_vehicle = _this select 0
_man = _this select 1


#check
If not _man in _vehicle and alive _man : exit
<Code here>
goto "check"
exit


and in ComRef it says:

soldier in vehicle
Operand types:
    soldier: Object
    vehicle: Object
Type of returned value:
    Boolean
Description:
    Check if soldier is mounted in the vehicle.

Example:
    player in jeepOne

(Note: boolean is true or False)

alive obj
Operand types:
    obj: Object
Type of returned value:
    Boolean
Description:
    Check if given person, vehicle or building is not dead / destroyed.

Example:
    alive player

« Last Edit: 31 May 2006, 02:42:33 by Flauta »

Offline OrnelP

  • Members
  • *
  • "The true battlefield is within"
Re: Not in car and not alive??
« Reply #4 on: 31 May 2006, 10:45:03 »
Ah, I beleive i have been enlightened.  Thank you for the explanation Flauta....mmm....flauta, with hot sauce and onions.... ;D
War is delightful to those who have had no experience of it
- Deciderius Erasmus

Offline Flauta

  • Members
  • *
  • There is no knownledge, that is no power
    • Chek mi FLog
Re: Not in car and not alive??
« Reply #5 on: 31 May 2006, 20:47:11 »
Scuse me?
What's the meaning of flauta for you? =P

Im glad to help you