OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: bedges on 23 Feb 2005, 00:14:31
-
yes, perhaps this ought to be in the cutscene forum, but i think it's more a scripting issue.
here's the deal. i have a village. something's happened, there are officials standing around. the police are there, some medics are there, and both the police and medics have cutscenes associated with them. triggers activated by player present. no problem.
these two groups are kept separate by necessity, just to keep the triggers nice and tidy, however in reality, the police would go over to the medics and find out what's going on.
so. i thought fine, i'll make a trigger that follows the policeman wherever he goes, so he can move around and the player will get the cutscene wherever he is.
my question is, what happens when the policeman's cutscene trigger overlaps the medic's cutscene trigger and the player stumbles into both simultaneously? how could i handle such a scenario?
-
Create a global variable in init.sqs:
OkayForScene = true
at the start of each cutscene script have the lines:
@OkayForScene
OkayForScene = false
at the end of the script have
OkayForScene =true
Would that do it?
That way you only get one script running at a time.
-
i had an inkling that might be the way to go. thanks. i'll test that anon.
EDIT - works like a charm, naturally ;)
cheers n beers