H3NRY 10 Posted November 10, 2009 (edited) allright so i am trying to make a trigger that once you get in the area it tells you where the guy is, once you kil him it is supposed to tell you where the next guy is. once you kill the first guy it says the " congrats' " but it doesnt deactivate the active task marker. it also doesn't call the mk_ftaskhint ( seperate problem introduced right now so dont worry about that one) trigger 1 condition:this on act. : kill1 = player createsimpletask ["kill him"];kill1 setsimpletaskdescription ["go kill him","kill him","KILL HIM!!!"];kill1 setSimpleTaskDestination (getMarkerPos "obj_1"); player setcurrenttask kill1;[obj_1] call mk_fTaskHint; trigger 2condition :!alive b1 on act. : hint "congrats! one of them bastards are down."; kill1 setTaskState "DONE" ;[obj_1] call mk_fTaskHint ;"obj_1" setmarkertype "EMPTY" ;kill2 setTaskState "ACTIVE" ;[obj_2] call mk_fTaskHint; Edited November 14, 2009 by H3NRY Share this post Link to post Share on other sites
ablueman 10 Posted November 10, 2009 realized my mistake, delete the post please admin?allright so i am trying to make a trigger that once you get in the area it tells you where the guy is, once you kil him it is supposed to tell you where the next guy is. once you kill the first guy it says the " congrats' " but it doesnt deactivate the active task marker. it also doesn't call the mk_ftaskhint ( seperate problem introduced right now so dont worry about that one) trigger 1 trigger 2 They dont delete posts generally because someone might have the same problem as you and hopefully you will post how you resolved the issue that way we all learn ;) Share this post Link to post Share on other sites
H3NRY 10 Posted November 10, 2009 lol. true. and i was trying to set a new objective without creating it first lol trigger 2 should be radius 0 - 0 condition :!alive b1 on act. : hint "congrats! one of them bastards are down."; kill1 setTaskState "DONE" ;[obj_1] call mk_fTaskHint ;"obj_1" setmarkertype "EMPTY" ;kill2 = player createsimpletask ["kill him too"];kill2 setsimpletaskdescription ["go kill him too","kill him too","KILL HIM!!!"];kill2 setSimpleTaskDestination (getMarkerPos "obj_2"); player setcurrenttask kill2;[obj_2] call mk_fTaskHint; right? lol Share this post Link to post Share on other sites
Mickd 0 Posted November 13, 2009 Hey guys, asking this here for the sake of not wanting to start a new thread. I have simple mission where a truck is to drive into a trigger thus 'resupplying the base' with supplies. The trigger itself works fine, however, if the truck is destroyed and subsequently respawns, the the trigger will not activate. Can someone point me in the direction of how to remedy this? I have the truck called 'truck1' in the name part of truck in the editor. Share this post Link to post Share on other sites
H3NRY 10 Posted November 13, 2009 basic questions to help people answer you.. are you using a respawn script? Share this post Link to post Share on other sites
Mickd 0 Posted November 13, 2009 basic questions to help people answer you.. are you using a respawn script? yes, respawn script in the init line in editor Share this post Link to post Share on other sites
H3NRY 10 Posted November 14, 2009 allright .. new problem :( my init.sqf isnt working past the exec revive init what am i doing wrong? server execVM "revive_init.sqf"; //Mission parameters skiptime (paramsArray select 0); execVM "briefing.sqf"; SHK_pos = compile preprocessfile "SHK_pos.sqf"; setterraingrid 50; mk_fTaskHint = compile (preprocessFileLineNumbers "fTaskHint.sqf"); if(true) exitWith {}; Share this post Link to post Share on other sites
shuko 59 Posted November 14, 2009 There should be errors in arma2.rpt or arma2server.rpt. Depending on Windows version they can be different place, so just use search. Share this post Link to post Share on other sites
H3NRY 10 Posted November 14, 2009 ah never knew those were even at all usefull :) thanks.. it ended up being my briefing having a miss spelled trigger making it stop there.. kind of weird that something so simple would make it stop reading it Share this post Link to post Share on other sites
shuko 59 Posted November 14, 2009 Ye, it stops executing the script if it runs into an error. Share this post Link to post Share on other sites
H3NRY 10 Posted November 15, 2009 allright now that it is WORKING.. i want to make it work the right way :) how would i make a trigger set a local variable? i want a trigger to only be able to be hit when the value is 1 but after that task is complete the variable changes to 2 after that task it is 3 and so forth. it is a simple "_var1=0 +1 " type of thing right? either that or i want to have a trigger make a trigger, which would be easiest and could you give me any push in the right direction? Share this post Link to post Share on other sites
shuko 59 Posted November 15, 2009 What are you trying to do with that trigger, which can't be done in the task completed triggers (!alive b1 etc.)? Share this post Link to post Share on other sites
ablueman 10 Posted November 15, 2009 Ye, it stops executing the script if it runs into an error. Not sure if it shows the same thing but if you add -showScriptErrors to your shortcut for arma you get informed of errors in your code. So I have: "C:\Program Files\Bohemia Interactive\ArmA 2\arma2.exe" -nosplash -window -nopause -showScriptErrors -mod=@panthera for my editting arma. Share this post Link to post Share on other sites
shuko 59 Posted November 15, 2009 Yep, that shows them one by one, so the last one will be visible. I use the switch as well, but log is more detailed and has all the errors. Share this post Link to post Share on other sites
H3NRY 10 Posted November 15, 2009 Not sure if it shows the same thing but if you add -showScriptErrors to your shortcut for arma you get informed of errors in your code. So I have: "C:\Program Files\Bohemia Interactive\ArmA 2\arma2.exe" -nosplash -window -nopause -showScriptErrors -mod=@panthera for my editting arma. ah thanks.. goingto add that too. and i am trying ot make it so everything is sequential, you cant go to the next objective tell the first one is complete. ( seems like a lot of work now that i started it.. also mking the "endmission" only trigger if ALL objectives are met) right now i am trying to do this.. it seems to be working. ( mission only ends with a win if the a1 thru a10 are true) one trigger with a condition of a1. another that you get to before it that has a1 = true Share this post Link to post Share on other sites
shuko 59 Posted November 15, 2009 Wouldn't it be just easier to have the objective1 trigger create the obj/task 2 and so on. Share this post Link to post Share on other sites
H3NRY 10 Posted November 15, 2009 yeah... already re-working it lol. i just cant make up my mind on how i want to do it Share this post Link to post Share on other sites
H3NRY 10 Posted November 16, 2009 mmk.. so yet another question. i searched but got nothing.. how do i set the side of a player ( or group of players AND AI) with a trigger? tried " side player west" but i got errors.. didnt know what else to try lol players and AI are named ( p1, p2, p3, p4) Share this post Link to post Share on other sites
shuko 59 Posted November 16, 2009 At the start of a mission or during it? Share this post Link to post Share on other sites
H3NRY 10 Posted November 16, 2009 after completing the first objective. see they are civilians right now i have the side set as WEST in the mission.sqf but that doesnt quite work right, i want after the first objective they are labeled hostile to the opfor ooh thought... "side= enemy" so "CIV=enemy" should do it on a trigger? wait then they would shoot eachother too.. gah Share this post Link to post Share on other sites
H3NRY 10 Posted November 16, 2009 well that wont work.. i dont want the opfor shooting the buildings lol ill just set the initial guys to " never fire" so they dont shoot them then have everyone else as engage at will Share this post Link to post Share on other sites
H3NRY 10 Posted November 16, 2009 well thanks shk.. one more question to you and everyone else :) i want to make a task to talk to someone, but the person HAS to spawn ( if they didnt have to i could make a simple script with an addaction to talk to them) because the whole area they are supposed to be in is going to be bombed, any way you could make the spawn script have an init value? Share this post Link to post Share on other sites
shuko 59 Posted November 17, 2009 createUnit It actually takes init as a parameter. Share this post Link to post Share on other sites
H3NRY 10 Posted November 17, 2009 ah ok.. cool if (isserver) then { _u = _this select 0; _s = _this select 1; _d = _this select 2; _r = _this select 3; _p = _this select 4; [color=Red][b]_i = _this select 5;[/b][/color] if (typename _u == typename "") then { _u createunit [([_p,_d,_r] call SHK_pos),(creategroup _s)[b], [color=Red]_i[/color][/b]]; } else { waituntil {!isnil "BIS_fnc_init"}; waituntil {BIS_fnc_init}; [([_p,_d,_r] call SHK_pos),_s,_u] call BIS_fnc_spawnGroup; }; }; so i could do this to the code and it will except an init there? ( where bold) sems too simple to me t work :) nul = ["Ins_Soldier_1",EAST,random 360,100,getpos player, "init value here"] execvm "script.sqf"; Share this post Link to post Share on other sites