Bren the ruler
Member-
Content Count
17 -
Joined
-
Last visited
Never -
Medals
Community Reputation
0 NeutralAbout Bren the ruler
-
Rank
Private First Class
core_pfieldgroups_3
-
Interests
Gaming, skateboarding
-
Whats wrong with this script?
Bren the ruler replied to Bren the ruler's topic in OFP : MISSION EDITING & SCRIPTING
I also made a flak script : </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ; flak.sqs ; by brendan _explosion = _this select 0 _unit = _this select 1 _time1 = _this select 2 _time2 = _this select 3 _rounds = _this select 5 _ammo = _this select 6 _a = 1 #loop1 goto "timer" #timer _i = 0 ~_time1 goto "loop" #loop _i = _i + 1 _a = a + 1 _bang = _explosion camcreate getpos _unit ~_time2 Fuze = "FxExploGround1" camcreate getpos _bang ? _a == _ammo : goto "end1" ? not alive( _unit) : goto "end1" ? _i == _rounds : goto "timer" goto "loop" #end1 EXIT <span id='postcolor'> it works fine but when the boms are created i want them to be destroyed at watever time i set it to,that works fine until you put it to like, 5 seconds and the bobms come out every 5 seconds . i know why but is there a way to run 2 parts of the script at the same time instead of one loop delaying the time to camcreate the bombs because the first one needs to blow up, thnka in advance brendan -
Whats wrong with this script?
Bren the ruler replied to Bren the ruler's topic in OFP : MISSION EDITING & SCRIPTING
hey thanks, im only new to scripting just started in fact. its so much easier to do everything outside of ofp it saves hours, brendan -
Can anyone help me please , Thanks. </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ;detect.sqs _player = _this select 0 _group = _this select 1 _state = _this select 2 _time = _this select 3 ? _group knowsabout _player : goto "loop" _i = 1 #loop _i = _i + 1 _group setbehaviour _state _group domove(getpos _player) ? _i == _time : goto "end" ~1 goto "loop" #end EXIT <span id='postcolor'>
-
How could this work?
Bren the ruler replied to Ex-RoNiN's topic in OFP : MISSION EDITING & SCRIPTING
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ;try this _group = _this select 1 _state = _this select 2 _time = _this select 3 ? _group knowsaboutplayer : goto "loop" _i = 1 #loop _i = _i + 1 _group setbehavior _state _group domove getpos player ? _i == _time : goto "end" ~1 goto "loop" #end EXIT <span id='postcolor'> dont know if it will work ill try it and then correct it if its wrong, brendan -
Scripting problem
Bren the ruler replied to Bren the ruler's topic in OFP : MISSION EDITING & SCRIPTING
hey thanks but tried that already it just blows the plane up but i made the script now and works fine here it is </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ; flak.sqs ; by brendan _explosion = _this select 0 _unit = _this select 1 _time1 = _this select 2 _time2 = _this select 3 _yn = _this select 4 _rounds = _this select 5 #loop1 ? _yn == 1 : goto "loop1" goto "timer" #timer _i = 0 ~_time1 goto "loop" #loop _i = _i + 1 _bang = _explosion camcreate getpos _unit ~_time2 Fuze = "FxExploGround1" camcreate getpos _bang ? _i == _rounds : goto "timer" ? _yn == 1 : goto "end1" ? not alive( _unit) : goto "end1" goto "loop" #end EXIT<span id='postcolor'> just needs a few fine touches _explosion = choose your explosion _unit = wich unit the flaks directed at _time1 = time between rounds _time2 = time it takes to explode _yn = 0 to make it work 1 to stop _rounds = how many rounds per go example in units init field or activtion box ["shell73",a10,5,0.4,0,5] -
Creating mid-air explosions
Bren the ruler replied to Prospero's topic in OFP : MISSION EDITING & SCRIPTING
i just made a script </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ; flak.sqs ; by brendan _explosion = _this select 0 _unit = _this select 1 _time1 = _this select 2 _time2 = _this select 3 _yn = _this select 4 _rounds = _this select 5 #loop1 ? _yn == 1 : goto "loop1" goto "timer" #timer _i = 0 ~_time1 goto "loop" #loop _i = _i + 1 _bang = _explosion camcreate  getpos _unit ~_time2 Fuze = "FxExploGround1" camcreate getpos _bang ? _i == _rounds : goto "timer" ? _yn == 1 : goto "end1" ? not alive( _unit) : goto "end1" goto "loop" #end EXIT<span id='postcolor'> its a bit messy so i got some explaining to do _explosion = choose your explosion _unit = wich unit the flaks directed at _time1 = time between rounds _time2 = time it takes to explode _yn = 0 to make it work 1 to stop _rounds = how many rounds per go example in units init field or activtion box ["shell73",a10,5,0.4,0,5] hope this helps and works, works fine with me , i only just started scripting and its so much easier and better brendan -
Scripting problem
Bren the ruler replied to Bren the ruler's topic in OFP : MISSION EDITING & SCRIPTING
thanks for the reply but what i wanted i planned was to make a grenade at the position of my plane then make another bomb at the position of the grenade to detonate a split second later so it would look like flak (explosions) trailing the plane , thanks -
for question 1, say your making an explosion at the same position as somebody all you do is explosion = "shell125" camcreate getpos playername or man setpos getpos playername or man setpos (getpos playername)
-
theres a part in my mission where a trigger is activated calling my script </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">; flak.sqs ; by brendan _explosion = _this select 0 _unit = _this select 1 _time1 = _this select 2 _time2 = _this select 3 #loop ~_time1 bang = _explosion camcreate getpos _unit ~_time2 bang setdammage 1 goto "loop"<span id='postcolor'> for some reason the bombs dont go off can anyone find a solution to this thanks, brendan
-
Thanks , i only use my brothers comps since im only 14 and know how to program in java and delphi but never got round to scripting in ofp
-
how to make them split from their groups and hide behind objects for a while while they advance
-
when i camcreate a explosion i cant repeat it with that trigger can anyone help me activation; no one repeat; countdown 5; on activation; bomb = "shell125" camcreate(trigger1) im creating a beach landing thanks
-
i have a trigger and i tried it on repeat timoout 5 explosion="heat125"camcreate(getpostriggername) but it only does it once ang i have tried many ways
-
dont worry, i found away im so stupid for me. i could have done better it was so simple
-
Try bart.jans way but if the jeep does move you could try putting another trigger with repeat on and in the act box: triggername sepos(getpos jeepname) this will set the trigger that has the activation stuff when another jeep passes in the area on the jeep constantly did you get that?