OFPEC Forum
Addons & Mods Depot => OFP - Addons & Mods General => Topic started by: rOk on 03 Aug 2004, 11:21:21
-
This isn't working-why?
fired = "[_this select 0,_this select 1] exec ""\addon\Scripts\xxx.sqs"""; "_this exec ""\addon\Scripts\xxx.sqs""";
OFP doesn't start, it coughs up this
" encountered instead of =
Any ideas?
Thanks
-
Why not call a script, then run the code form that?
Dunno, there it the right ammount of "s in that code..
It could be something to do with the stuff after the ;...?
Not sure
- Ben
-
You mean like integrating the second script into the first one, right?
Will see what I can cook up. :)
#edit:
Or just "this exec xxx2.sqs" written at the bottom of the first one?
or how about this one
if xxx1.sqs is executed then exec xxx2.sqs
but syntax is needed i'm a nOOb :-[
#edit2:
Well got it to "work", error wise at least, although I must have missed something in O2=>it's a gun recoil script, but sadly there's no recoil.
-
This isn't working-why?
fired = "[_this select 0,_this select 1] exec ""\addon\Scripts\xxx.sqs"""; "_this exec ""\addon\Scripts\xxx.sqs""";
OFP doesn't start, it coughs up this
" encountered instead of =
Any ideas?
Thanks
fired = "[_this select 0,_this select 1] exec ""\addon\Scripts\xxx.sqs""; _this exec ""\addon\Scripts\xxx.sqs""";
Why not call a script, then run the code form that?
When the fired EH is in question it is much more reliable and faster to pass all the needed variables/arguments/whatever straight from the EH rather than a separate script...
-
Okay
Ah, I see what was wrong with the code now ;)
The " at the beggining
_ ben
-
Hei rOk!
Hope maybe this help, its another metode :
Why dont you make a loadfile (scriptload.sqf or somthing.sqf)
In that script you but this two line:
_this call loadFile "\addon\xxx1.sqsf";
_this call loadFile "\addon\xxx2.sqs"
than you put this line in your config.cpp:
class EventHandlers
      {
   fired = "[_this select 0,_this select 1] exec ""\addon\scriptload.sqf""};
      };
Something like that, i'am not so good in that EventHandlers,
but you can make something to call on one script, then the script start 2 other script.
I use that in my script, but its for some FX smoke, so my code looks like this:
class EventHandlers
{
fired = "if ((_this select 4) == ""something here, like weapon, mag, ammo"") then {_this call loadFile ""\addon\smoke.sqf""};";
};
I hope this help :)
-
Hi all
Thanks for all your help i got it working and now i have tank main gun recoil coupled with a nice shock dust.
But please stay tuned, there's bound to be more problems down the way-namely i'll start working on my own anti-missile system which atm is looking to be a cross of dkm-comanche jammer and a script from some Chinese guys which actually destroys the missile and creates some drop effects with it.
Thanks again