I think I can help you out a bit here Maximus-Sniper,
I've fixed the removeAllEventHandlers line to a valid code. There was 2 problems with that:
1. The
forEach command didn't have the right syntax, the
_x should be first, followed by the command. I also didn't finish the eventhandlers part.
2. putting
... forEach units eastsnipe tells OFP that eastsnipe is a group, but it it should be an array of all enemy units.
(3.) You also left spaces in the syntax which probably didn't help
Maybe I'm missing something here, but when was
slo_mo_deathcam_on and
slo_mo_deathcam_off defined?
OFP will have a hard time switching it ona nd off if it doesn't know what it is.
Here's what I got for that part of the script anyway:
#loop
? slow_mo_deathcam_on : goto "EH"
{_x removeAllEventHandlers "killed"} foreach eastsnipe
~5
goto "loop"
#EH
{_x addEventHandler ["killed",{this exec "\RAST\script\Death_Cam\rast_deathcam.sqs"}]} foreach eastsnipe
? slow_mo_deathcam_off : goto "loop"
~5
goto "EH"For the config.cpp, I don't think that the command
list is the right one for the job.
I think that extra line you put in to make it work is fine
The only thing I'd change would be the statement line:
statement="this exec {\RAST\script\Death_Cam\deathcam.sqs}";Should work ok.
btw I don't know how you've been testing this, but for what I've put to work, you need to:
1. Make a new mission in OFP
2. Place some enemy units around and name them something like: "east1", "east2", "east3" - but don't group them!
3. In the mission folder, make an init.sqs and put:
eastsnipe = [east1, east2, east3] // I forget if you need quotation marks around them or not, try both4. Save the init.sqs and start the mission - if there are no script or config errors it should work fine.