Jump to content

twirly

Member
  • Content Count

    1304
  • Joined

  • Last visited

  • Medals

Everything posted by twirly

  1. I'm not surprised! It creates triggers over and over as long as the player is alive. Maybe try taking out the while {alive player} do { .....and {sleep .3}; deleteVehicle _trg; That way it will only create one trigger.....which I believe is all you need.
  2. twirly

    Eliteness hates me.

    There are different versions of Eliteness and also different versions of DePBO. Don't use it much anymore but I have Eliteness v2.23 and DePBO.dll v1.62 and I think that combination worked well.
  3. Try this.... the hint will show you what's on the island/map. _locs = [ nearestLocations [[0, 0, 0], ["NameCityCapital", "NameCity", "NameVillage", "NameLocal"], 100000]]; hint format ["%1",_locs]; On Utes for instance...there are no Capitals or Cities.
  4. Might be as simple as this.... if heligroup_z1 is a list of groups! while {true} do { if (count heligroup_z1 <= 2) then { //do reinforcements or whatever here }; sleep 300; };
  5. Might be much easier to script it than do it the way you are doing it! Now I'm saying "easier".....but the logic needs to be sorted out.... and at the moment I don't have a very logical brain. ---------- Post added at 12:51 PM ---------- Previous post was at 11:45 AM ---------- After a few coffees it's all clear now. Much simpler than I first thought! :) Create a little script in your mission folder and add this code to it. Here it's called "script.sqf"... but you can give it a more imaginative name. script.sqf... _randnum = floor random 2; switch (_randnum) do { case 0: { deletevehicle P1; deletevehicle P2; deletevehicle P3; }; case 1: { deletevehicle Z1; deletevehicle Z2; deletevehicle Z3; }; }; In your players init put this... nul = [] execVM "script.sqf"; Should be easy enough to follow what's going on. No need for probability of presence... so make sure it's off on all the targets.
  6. Did some testing and it seems the AI won't go to just any position in the buildings.....only the fixed buildingpos's. It will take quite a bit of scripting to find the nearest viable building position for the AI to go to. This will still not be ideal....as the nearest position might be on the floor above or below.
  7. Hi...what do you mean by "appears"? .... and are you trying this the very hard way with triggers?
  8. twirly

    TEST

    Hi man...and welcome to the forums. Use say3D for directional sound.
  9. You can try... _ai [url="http://community.bistudio.com/wiki/doMove"][u]doMove[/u][/url] getpos player;
  10. twirly

    Simple Hint on Dedi server !

    Found a couple things that were not quite right....try this... init.sqf.... if (isNil "MyNetHintSilent") then { MyNetHintSilent = [0,0]; }; "MyNetHintSilent" addPublicVariableEventHandler { private ["_hint","_min","_sec"]; _hint = _this select 1; _min = _hint select 0; _sec = _hint select 1; hintSilent format ["%1:%2",_min,_sec]; }; timer.sqf.... if (!isServer) exitWith {}; private ["_t","_min","_sec"]; _t = (_this select 0) * 60; while {_t > 0 && psholdtimer} do { _min = floor (_t / 60); _sec = floor (_t mod 60); _min = (if (_min <= 9) then {"0"} else {""}) + str _min; _sec = (if (_sec <= 9) then {"0"} else {""}) + str _sec; MyNetHintSilent = [_min,_sec]; //for SP and COOP if (not isDedicated) then { hintSilent format ["%1:%2",_min,_sec]; }; publicVariable "MyNetHintSilent"; _t = _t - 1; sleep 1; }; From my limited testing seems to work everywhere.... SP, Dedi and COOP. EDIT: If you need me to post my little test mission....just scream!
  11. Actually... just realised the example I posted changes the onAct and not the condition...lol! But...anyway it still is the right command to change the condition.
  12. I think you might also need a check for non-existence. To test if the units don't exist... use isNull
  13. Place two triggers on your map. Set for Anybody Present or whatever. Name the first one Trig1 (not really necessary).... Name the second trigger Trig2. In the first triggers (Trig1) On Act put this code.... Trig2 [url="http://community.bistudio.com/wiki/setTriggerStatements"][u]setTriggerStatements[/u][/url] ["this", "hint 'Hint from Trig2'", ""]; Enter the trigger Trig1.... and Trig2's On Act statement will be set to... Hint "Hint from Trig2"; ...and you will get this hint when you enter Trig2. Hope that helps you.
  14. twirly

    Simple Hint on Dedi server !

    Make your own network command for it using PVEH's.... In your init.sqf.... //************************************************************* //Network hintSilent system PVEH //************************************************************* if (isNil "MyNetHintSilent") then { MyNetHintSilent = 0; }; "MyNetHintSilent" addPublicVariableEventHandler { private ["_hint"]; _hint = _this select 1; hintSilent format ["Time Left: %1 seconds",_hint]; }; Then to use it.... if (isServer) then { for "_i" from 100 to 1 step -1 do { MyNetHintSilent = _i; publicVariable "MyNetHintSilent"; sleep 1; }; }; Works on Dedicated server. This hints silently "Time Left: x seconds" on clients machines.
  15. I have not tested....but do you have the Functions module placed on the map?
  16. Hi... downloaded the file and there are no scripts in the download package just a mission .sqm!
  17. twirly

    "Tinted" Effect

    Have a look here mate.... http://forums.bistudio.com/showthread.php?75528
  18. Try it like this..... _null = [] spawn { while {true} do {{_x doMove (getPos player)} foreach units Hunters; sleep 5; }; };
  19. No worries man... glad to help. Welcome to the forums. Actually I see you've posted before! My bad!
  20. Try spawning the vehicle somewhere else and moving it to the marker.... _vec = createVehicle [_type, [0,0,30], [], 0, "NONE"]; _vec setPosASL [(getMarkerPos "Spawn_Aircraft") select 0,(getMarkerPos "Spawn_Aircraft") select 1,18]; EDIT: Just tried it ...it works fine!
  21. I'm assuming the marker "Spawn_Aircraft" is placed at the position of the carrier deck on the map. You need to set the "z" coordinate (height) of the spawn position to be 18. Try this.... _vec = createVehicle [_type, [(getMarkerPos "Spawn_Aircraft") select 0,(getMarkerPos "Spawn_Aircraft") select 1,[b][color="#FF0000"]18[/color][/b]], [], 0, "NONE"];
  22. Try putting this in your this in your init.sqf see if it works. Using the setFriend command. EAST setFriend [CIVILIAN, 0];
  23. Hi... did you try 1 for the waypoint instead of 0? This is the waypoint number.... with 0 (zero) being the position of the unit when placed on the map. It's not clear (to me anyway) exactly what you want.... you might have to post some code or try to explain that a little better. [hughesGrp, [color="#FF0000"][b]1[/b][/color]] [url="http://community.bistudio.com/wiki/setWaypointType"][u]setWaypointType[/u][/url] "MOVE";
  24. Hi... check out this thread here and download the little demo mission in post #3. See if that helps you out. Might take a little hair pulling to grasp what's going on. It uses Triggers and Global Variables which is pretty much what you need. There's a list of good stuff on this page taken from the Stickies at the top of this forum. There is a link to the Script Commands there. Two essential things for debugging scripts would be having the -showScriptErrors switch placed in your shortcut and the Arma.RPT file EDIT: More... Open other peoples code and fiddle with it.... Get yourself a good text processor that will highlight code in different colours. That way when you look at script you will immediately make out what the commands are in the code. I use TextPad but NotePad+ is also supposed to be good I believe.
  25. Here's some code for it.... hope it helps you. _x1 = getPos _staticweapon select 0; _y1 = getPos _staticweapon select 1; _x2 = getPos _target select 0; _y2 = getPos _target select 1; _dx = _x2 - _x1; _dy = _y2 - _y1; _direction = (_dx atan2 _dy) mod 360;
×