nuxil
Member-
Content Count
1606 -
Joined
-
Last visited
-
Medals
Everything posted by nuxil
-
Score or Kill limit for Coop..
nuxil replied to iceman77's topic in ARMA - MISSION EDITING & SCRIPTING
Hi there. why dont you add up the score of all the players in your group.. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _unit = _this select 0; _gr = group _unit; _unitsgr = units _gr; _Totscore=0; {_Totscore = _Totscore + (score _x ) } forEach _unitsgr; if (_Totscore >= 500) then { //set a variable to end the mission here.. end = "true" // which is read by another script.. // or execvcm it here.. }; -
how to calulate the direction of the weapon?
nuxil posted a topic in ARMA - MISSION EDITING & SCRIPTING
Hi forum i need to know how to calulate the direction of the weapon.. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _me = (_this select 0); _pw = primaryweapon _me; _wdir = weapondirection _pw; now. how do i get the x,y values converted to direction im not so good with asin/acos/atan(2) -
hi forum.. i would like to get some help.. im trying to make a missile move to a target. but i cant get the missile to tilt up/down. i dont got the script infront of me since im at work.. but it looks simelar to this. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _me = _this select 0; _targer = _this select 1; _Mx = getpos _me select 0; _My = getpos _me select 1; _Mz = getpos _me select 2; _dirme = getdir _me; _missile = "M_Ch29_AT" createvehicle [0,0,0]; _missile setpos [_Mx,_My,_Mz +10]; _missile setdir _dirme; while {(alive _missile)} do { _MiX = getpos _missile select 0; _Miy = getpos _missile select 1; _Miz = getpos _missile select 2; _Tx = getpos _target select 0; _Ty = getpos _target select 1; _Tz = getpos _target select 2; _dirX = (_Tx - _Mix); _dirY = (_Ty - _Miy); _dirZ = (_Tz - _Miz); _dir=[_dirX,_dirY,_dirZ]; _missile setvectordir _dir; }; the missile moves correct right/left. but up/down it dosent move fine at all.. any ideas?
-
thers probealy alot of way's to do it.. 1st of all.. i would avoid using a trigger for this. but rather put a eventhandler on the unit. on the init field of the unit put a eventhandler "killed" which exec your respawn script. this "i think" will be better for performance. since its only executed when the unit dies.. and btw. why do you mix sqs and sqf ? stick to sqf. sqs is ofp while sqf is arma. but arma support both tho.
-
Message Format of "player" problem...
nuxil replied to nullsystems's topic in ARMA - MISSION EDITING & SCRIPTING
if i got you right,, you are trying to track a player with a marker ? in that case.. // suspect.sqf _player = player; _marker = "a name"; nil = [_player,_marker] execvm "track.sqf"; // track.sqf _pl = _this select 0; _name = _this select 1; _marker = createMarker [format["%1",_name], getpos player]; while {(alive player)} do { format["%1",_name] setMarkerPos (getpos player); sleep 0.5; }; i think this should work,, have not tested it out , cos im at work -
Message Format of "player" problem...
nuxil replied to nullsystems's topic in ARMA - MISSION EDITING & SCRIPTING
try replasing "_marker" setMarkerPos (getPos _player) with format["%1",_marker] setMarkerPos (getPos _player) and get rid you you hint line -
Message Format of "player" problem...
nuxil replied to nullsystems's topic in ARMA - MISSION EDITING & SCRIPTING
its because. _player = _this select 0 is the same as _suspectbag = name player.. meaning its a string. you cant get the position from a string. "the name of the player" change _suspectbag = name player to just player and it should be alright -
thank you! that should solve the problem..
-
hi forum!.. topic should say. ""with NO units in your group"" just a quick question.. is it possible to get that overview look if you got no units in your group? im not talking about the 3rd persion veiw. i cant find a way to get it to work unless i have units in my group.. or that stupid workaround with making a gamelogic join my group..  which it quit anoying.. b|cos its spaming my radio  with "where are you".
-
hehe yea. i could try that. but i guess i could set the gamelogic at pos 0,0,0 and make it "move->halt" in a script. that should shut it up. i was hoping ther was another way of doing it.. without using a gamelogic or a unit.
-
ok thank you for your answer guys. i just finished scripting my own version of a healtbar.
-
hi forum.. i have a noob question regarding addons/configs. the thing is. i would like to have the "healtbar" addon in my mission.. so everyone that plays the mission gets it. instead of starting up arma with that addon / ""mod?"", i have unpbo the addon. and i have placed it inside my mission dir. i also have included the config.cpp file in my description file. however it doesnt seem to work,, i get no errors when loading/playing the mission, but the healtbar isnt there.. how do i do this? i can script a bit. but addons and config files i have little experiance with, ps: the healtbar addon seems to be a edited version of the c:\programfile\....\arma\Dta\bin.pbo file
-
hmm. ok thank for the reply. i thought it was possible to it. but guess you know that better than me.. could you explain to me why its not possible to do so?
-
im woundering,, is it posseble to script afterburer on the su34 ? Or would it be to hard tracking the position of the aircraft? i mean like the 3d position of the object, not only the 3d position on the map.. i know one can do many fancy effects with the drop command,, :P
-
hi forum.. i have been looking a while at the wiki now, but i cant seem to find a command that dose what i need.. or maybe i am just missing it.. anyway.. i need to know if thers a command that can check if an aircraft is in hover mode. is there a way to do that ? the action "AUTOHOVRE" only toggles the state on/off.
-
attach a eventhandler to the heli "hit" or "dammaged". then make it exec a script with forceend perhaps..
-
ok let me put it this way.. in real life a harrier can only hover for about 90 sec's before it runs out of water. yep water.. the water is for cooling down the "nozzels" exusth! so what i want to do it check the hover state of the aircraft. if its hovering. then a script is executing counting down form 90 sec's to 0.. when 0 is reached it starts to dammage the aircraft "If the harrier is flying". otherwize stop the script and continue as normal... so what i need is to check the hoverstate of the aircraft. "on/off" since i dont want the script to be runing when autohover is off.. for this job it looks like a addon is needed.. or maybe thers a way to read the "Id's" text of the useraction menu for the aurohover menu, "auto-hover on / auto-hover off".. if this is some sort of dialog box i guess it has a id number and the text inside it can be readed.. some cheap workaround cheking the speed and hight i dont want any thing to do with,
-
err. double post
-
ok. it looks like i have to remove the action and make a new one. what script is the current action executing? i unpbo the air.pbo file but cant find any ther. i can see something called VTOL in cfgVehicles ther. i guess that has something to do with auto hover.
-
no. i find it hard to belive it cant be done. maybe thers a way to check if the hover icon is present on the display. but not sure about that.
-
what more is ther to tell. i makeing a script that suppose to do one thing if hover mode is on and another thing if its off. so i need to know how i can check if its on or not. i find no command that does that. a workaround would be nice.
-
i coud realy need some help on this! is ther some simple command i have over looked? pherhaps there is a way to check the exausth position. with animationtate. or simelar. i tried it with no luck.is ther a way to check if the user action has been activated?. Anyone with some great ideas?
-
afik. thats not possible, even if you could use setpos on the missile.. the missile would explode after a while.
-
Thanks UNN for taking your time and explain it to me/us btw in mr.flea's script. howcome he uses VY and VZ before they are defined? <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> #define ROL [\ M1(1,0) * VY + M1(2,0) * VZ,\ M1(1,1) * VY + M1(2,1) * VZ,\ M1(1,2) * VY + M1(2,2) * VZ\ ] #define VY 1 #define VZ 0
-
DMarkwick yeah. setvectorup is verry confusing.. and setvectordir i dont understand the point of. setdir does exactly the same. since the z agrument for setvectorup dosent seem to work well. bug in setvectordir? form what i understand vectorup sets the bank "lef/right" while vectordir sets the direction left/right. not up/down vectors, but no 100% sure here. Master85 that makes me more confused.. if you know the vectors "[ox,oy,oz]" you can just do _object setvectorup [ox,oy,oz]; someone should update the wiki or atleast make a good guide for thouse two commands. the info on the wiki sucks.