Drinker
Member-
Content Count
17 -
Joined
-
Last visited
-
Medals
Everything posted by Drinker
-
Is it possible to add new markers ingame? I would like to add and remove an infinte number of markers with scripts. Is there a command or script that creates new markers from nothing, something like createVehicle for vehicles? thanks
-
Hi! I need help with preventing the AI units to respawn. I need the "playable" units but if they are not players, they shouldn't respawn. I tried in various ways but none of them is 100% reliable. Respawn type is "base". Does anybody have a "simple" solution to this? thx
-
the problem is how can i recognize which units have already died and respawned; i get an array of already dead units, then i check if any of them is alive again the problem is that when a unit is alive again - it will not be in that array, the array won't refer to the respawned unit but to the dead body - objNull so i got an array of objNulls and no array with respawned units now i'm trying to solve this problem using units names in array - does anybody know if it can happen that more than 1 units have exactly the same name?
-
Ai retreating after 75% casualties
Drinker replied to Javito1986's topic in OFP : MISSION EDITING & SCRIPTING
Try something like this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _allgrp=[group1,group2,group3,group4] _initnumb=0 "_initnumb=_initnumb+(count units _x)" forEach _allgrp #begin ~1 _newnumb=0 "_newnumb=_newnumb+(count units _x)" forEach _allgrp ?(_newnumb/_initnumb>0.25):goto "begin" "_x move _retreatposition" forEach _allgrp exit -
i see whatever, thx
-
No, it won't work. Players need to respawn multiple times, only the AI "playable" units shouldn't respawn. It's useless if i count the number of players for each side as it has nothing to do with my problem. Also the number of "playable" AI will rarely be 0 - only if all of them die at nearly same time.
-
i've searched for the answer on the forums but didnt find it... how do i get a list of all players in a MP game on the server and on all clients? thx
-
You can't simply do that. You must dePBO the addon (for this you should ask the addon maker) and then change a line or two in the config.cpp
-
Any idea how to activate a command based on
Drinker replied to Agua's topic in OFP : MISSION EDITING & SCRIPTING
There's another way, just one script, works also for constantly moving units execute this script just 1 time, put-> this exec "script.sqs" in the init of one unit example script.sqs: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _distance=50 \\set join distance _Unitarray=[unitjoin1,unitjoin2,unitjoin3] \\names of units that will join the player #start ? (count group player == 12):goto "fullGrp" \\if you already have 11 soldiers in group _cu=0 ? (count _Unitarray == 0):exit \\end script when all units joined player #loop _unit=_Unitarray select _cu ? !(alive _unit):_Unitarray=_Unitarray-[_unit];goto "notjoin" \\dead unit will not join ? ((_unit distance player)>_distance):goto "notjoin" [_unit] join player _Unitarray=_Unitarray-[_unit] #notjoin _cu=_cu+1 ? (_cu<count _Unitarray):goto "loop" goto "start" #fullGrp player sidechat "You already have 11 soldiers in group" @ (count group player < 12) goto "start" this should work -
There's a big problem...it doesn't resize only the selected array, but also all arrays that are equal to that array. Example: _Array1=[2,3,4,5] _Array2=_Array1 _Array1 resize 2 The result is: _Array1=[2,3] _Array2=[2,3] -> why the hell resizes both arrays?? can anybody show how to workaroud this in a simple way? thx
-
you never know, there can always be a better trick to workaround glad to help you cya
-
Thx a lot however, i found another way _Array1=[2,3,4,5] _Array2=_Array1 _Array2=_Array2+[] _Array1 resize 2 with +[] the program thinks that the arrays are now different and resizes only the first, i think that this should work also for arrays within arrays cya
-
aha i see, however thx for the help ... i'll have to do in the long way ... like spinor said, or , i'll wait OFP2 bn880 , i've read that thread - great suggestions cya
-
it's possible but so there will always be a limit ... i think that a kind of command or script must be because if it is possible to insert markers manually it must be also possible to insert them by script (automatically) ... maybe Suma knows how
-
thx for the info, i already know that ... but my question wasnt this ... i need to create a marker in a script - and to remove it ... you cannot click on the map while playing if u need 100 dot markers in a few seconds... so im asking again if anybody knows if there is a way to insert markers ingame - not manually ? anyway thanks
-
Great, thanks a lot
-
Is possible to remove decimals from a value (real numbers) with a command or something similiar? like "trunc" in Pascal I need it for a script to calculate % , but i dont want decimals like 15.3452%, i want just 15%. thx, cya