OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Ex-RoNiN on 23 Aug 2002, 18:22:48

Title: Starting cutscene only if player is not in vehicle...
Post by: Ex-RoNiN on 23 Aug 2002, 18:22:48
Basically, this cutscene starts showing as soon as a certain trigger is activated.

What I am looking for, either through the editor or through changing my script, is for a command (or something similar) to prevent the trigger getting activated if the player is in a vehicle. Once he steps out of that vehicle, then I want the trigger to get activated.

The player's vehicle was empty.

Any ideas on how to do that?  ???
Title: Re:Starting cutscene only if player is not in vehicle...
Post by: mikeb on 23 Aug 2002, 18:30:04
PLAYER in VEHICLENAME

checks whether he's in the vehicle.  So if you add the negative (!) to your script/trigger condition, then the cutscene won't happen unless he's out of the vehicle.

If you have more then one vehicle that he may enter, then I'm not sure.  MAybe an array will work...

So use this in a script

?! PLAYER in VEHICLENAME: allowcutscene=true

then put allowcutscene (or whatever) as one of the conditions
Title: Re:Starting cutscene only if player is not in vehicle...
Post by: Ex-RoNiN on 23 Aug 2002, 18:35:54
PLAYER in VEHICLENAME

checks whether he's in the vehicle.  So if you add the negative (!) to your script/trigger condition, then the cutscene won't happen unless he's out of the vehicle.

If you have more then one vehicle that he may enter, then I'm not sure.  MAybe an array will work...

So use this in a script

?! PLAYER in VEHICLENAME: allowcutscene=true

then put allowcutscene (or whatever) as one of the conditions

Hmm yeah, thats the problem, there's more than one vehicle :(
Title: Re:Starting cutscene only if player is not in vehicle...
Post by: mikeb on 23 Aug 2002, 18:44:04
For a script that shouldn't actually be a problem


~1

#check

? PLAYER in VEHICLENAME: goto "check"; allowcutscene=false
? PLAYER in VEHICLENAME_1: goto "check"; allowcutscene=false
? PLAYER in VEHICLENAME_3: goto "check"; allowcutscene=false

allowcutscene=true

exit.




This script should check every second if you activate it, whether you player is in any number of vehicles and will only make the allowcutscene true if he's not.


Haven't tried but something like that (bit of fiddling required) should work.
Title: Re:Starting cutscene only if player is not in vehicle...
Post by: Bremmer on 23 Aug 2002, 19:04:54
Much better is (vehicle player) != player

This condition is true whenever the player is in any vehicle.

Cheers