Jump to content

Cloughy

Member
  • Content Count

    392
  • Joined

  • Last visited

  • Medals

Everything posted by Cloughy

  1. Heres a better one, <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 _target = _this select 1 _max = _this select 2 _weapon = _this select 3 _delay = _this select 4 _unit doWatch _target ~2 _i = 0 #loop _unit fire _weapon ~_delay _i = _i + 1 ? _i < _max : goto "loop" exit Worked with a shilka i just tested, fireing at a harrier. You may want to use doTarget if you want it to be accurate. Good effect though. P.S _max is the loop max, and delay is the delay between commands. Ie longer delay for a shilka than a pk or DSHKM. Cheers GC
  2. Cloughy

    OPFOR searchlights

    Heres the excellent Searchlight SQS, modded a little to take a max an min dir, ie 300 to 60 would cover the north, it aint perfect but with your help im sure it could be. Orig script by satexas69 Hope it helps someone like it helped me. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ;watch script for searchlights 0.3 ;written by Blanco ;modded by Cloughy _unit = _this select 0 _dirMin = _this select 1 _dirMax = _this select 2 _dis = 200 ?_dirMax = 0 && _dirMin = 0: _dirMax = 360 #loop ?!alive _unit : exit ?_dirMin > _dirMax :_dirMax = _dirMax + 360; _dir = (random (_dirMax - _dirMin)) + _dirMin; _steps = random (_dirMax - _dirMin); goto "dirsorted" ?_dirMax > _dirMin : _dir = (random (_dirMax - _dirMin)) + _dirMin; _steps = random (_dirMax - _dirMin) #dirsorted ?_dir < 0: _dir = _dir +360 ?_dir > 360: _dir = _dir -360 ;hint format ["Dir: %1",_dir] _steps = _steps - _steps %1 ;hint format ["Dir is %1 in %2 steps",_dir,_steps] ~2 ;hint "Heading for a new direction" _x = 0 _i = -1 _maxheight = 45 _minheight = 2 _inc = -0.2 _height = (2 + random 43) ;hint format ["height = %1",_height] ~1 ?random 2 < 1 : _i = 1 ?random 2 < 1 : _inc = 0.2 #steps ?!alive gunner _unit : goto "unitdied" _dir = _dir + _i ?_dir < 0: _dir = _dir +360 ?_dir > 360: _dir = _dir -360 _upos = getpos _unit _cposx = _upos select 0 _cposy = _upos select 1 _cposz = _upos select 2 _height = (_height - _inc) ?(_height > _maxheight) : _inc = 0.2 ?(_height < _minheight) : _inc = -0.2 ?alive _unit : _unit doWatch [_cposx + ((sin _dir) * _dis), _cposy + ((cos _dir) * _dis),(_height - _inc)] ;hint format ["Direction is %1\n%2 Steps to go\nHeight is %3",_dir,_steps,(_height - _inc)] ~0.2 _steps = _steps - 1 ?_steps > 0 : goto "steps" goto "loop" #unitdied ;hint "unitdied" _gl = "logic" createvehicle [0,0,0] _gl moveingunner _unit @!alive _unit deletevehicle _gl exit Cheers GC
  3. Cloughy

    Lighting

    Heres the excellent Searchlight SQS, modded  a little to take a max an min dir, ie 300 to 60 would cover the north, it aint perfect but with your help im sure it could be. Orig script by satexas69 Hope it helps someone like it helped me. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ;watch script for searchlights 0.3 ;written by Blanco ;modded by Cloughy _unit = _this select 0 _dirMin =  _this select 1 _dirMax =  _this select 2 _dis = 200 ?_dirMax = 0 && _dirMin = 0: _dirMax = 360 #loop ?!alive _unit : exit ?_dirMin > _dirMax :_dirMax = _dirMax + 360; _dir = (random (_dirMax - _dirMin)) + _dirMin; _steps = random (_dirMax - _dirMin); goto "dirsorted" ?_dirMax > _dirMin : _dir = (random (_dirMax - _dirMin)) + _dirMin; _steps = random (_dirMax - _dirMin) #dirsorted ?_dir < 0: _dir = _dir +360 ?_dir > 360: _dir = _dir -360 ;hint format ["Dir: %1",_dir] _steps = _steps - _steps %1 ;hint format ["Dir is %1 in %2 steps",_dir,_steps] ~2 ;hint "Heading for a new direction" _x = 0 _i = -1 _maxheight = 45 _minheight = 2 _inc = -0.2 _height = (2 + random 43) ;hint format ["height = %1",_height] ~1 ?random 2 < 1 : _i = 1 ?random 2 < 1 : _inc = 0.2 #steps ?!alive gunner _unit : goto "unitdied" _dir = _dir + _i ?_dir < 0: _dir = _dir +360 ?_dir > 360: _dir = _dir -360 _upos = getpos _unit _cposx = _upos select 0 _cposy = _upos select 1 _cposz = _upos select 2 _height = (_height - _inc) ?(_height > _maxheight) : _inc = 0.2 ?(_height < _minheight) : _inc = -0.2 ?alive _unit : _unit doWatch [_cposx + ((sin _dir) * _dis), _cposy + ((cos _dir) * _dis),(_height - _inc)] ;hint format ["Direction is %1\n%2 Steps to go\nHeight is %3",_dir,_steps,(_height - _inc)] ~0.2 _steps = _steps - 1 ?_steps > 0 : goto "steps" goto "loop" #unitdied ;hint "unitdied" _gl = "logic" createvehicle [0,0,0] _gl moveingunner _unit @!alive _unit deletevehicle _gl exit Cheers GC
  4. _unit = _this select 0 _target = _this select 1 _unit doWatch _target ~2 _i = 0 #loop ?i<10 : _unit fire "WEAPON-NAME" ~0.3 _i = _i + 1 goto "loop" *************************************** Weapon names here http://community.bistudio.com/wiki/ArmA:_Weapons Its not perfect, but could be with some tweaking. Cheers GC
  5. I have decided to use the unit fire "WeaponName" Seems to work when i did a simple test. Also used unit dowatch. Just hope it works in the mission. Though its a DKSHM (or whatever) so i will have to give command in a loop to simulate automatic fire. Cheers for the help though. GC
  6. I was wondering if anyone would know how to generate a random number between two vlaues? I know the random function in the game only generates from 0 to the number specified. Cheers GC
  7. Come on, Somebody must know how to do this. It must be on the same lines as creating a bomb and setting its velocity and dir? To anyone who can help. Cheers GC
  8. Could you loop through the trigger in a script. Then check each objects height and manually sort/move them into arrays for each floor? Then count the arrays size and display that. Just an idea. Cheers GC
  9. Cloughy

    Lighting

    What about EditorUpdate1.02 the third party addon. You can add street lights and stuff. Cheers GC
  10. Cloughy

    Cras that burn forever

    Why dont you use the CSL_Prtcl_Param_Util_V2 demo mission to create the fire and smoke you want, then copy the values into the script provided in the rar file. I used this to create a light smoke trail from a downed BH that i didnt want to look knackered and on fire. this script can make loads of stuff, and you can edit the values on screen and see the results then copy the values for your static script. Have a look on http://www.armedassault.info/ the link to it should still be there. Cheers GC
  11. Cloughy

    Burning Buildings

    Couldnt you run one machine as a dedicated server and the other to run the game? Just an idea Cheers GC
  12. Cloughy

    Grandma Drives/sails faster

    @ XCess Does your script work in MP? I have seen what it does in Sp and it works a treat with boats. Cheers GC
  13. Im looking for a smoke script, that i can control the amount of smoke coming out. Its for a downed helo. I want it lightly smoking like it does with tail rotor failure. i dont want it on fire, cause i want to have some lads survived the crash. Cheers GC
  14. Cloughy

    animation browser

    This has already been done, There is a demo mission where you can select any anim you want and watch the player on screen execute the move. A search of this forum should find it. Cheers GC
  15. Is there a script that can be used to detect if a UAZ with US SF in is near commies, so i can turn its captive status off. Its a night mission and the reds wouldnt be able to see that there are USSF are in, until it was close. later on, once the crap had hit the fan, i would want to turn this off. Also does the KnowsAbout command work on dead soldiers, ie commie5 knows about deadCommie1, So if you dont hide the body, they could get found, and commie go on high alert. Edit: BTW its for MP Dedi Coop mission. Cheers GC
  16. The flyinheight over think 100, dont work> It was a bug in ofp as well. Also you could try a timeout value in the waypoints of the choppers, set each choppers waypoint to a different value and they will wait for that amount of time at the waypoint. I think there is timeout and another time thing in the trigger editor. use the top one, i think timeout is the 2nd one. Also for your trigger, make it bigger and bluefor present and use chopper1 in this list && this, where chopper is your chopper1 name. Might help you. Cheers GC
  17. I want to have a Harrier fly in to the northern island, near the hills. I want to have the Shilkas engage it, not really hitting it, but having a go. I want this to work on a dedi coop server. I have tried in the editor, but they dont even have a go at shooting at it. First run was at default height, 2nd was flyinheight 50; speed was normal. Should i disable ai move, and have them all part of the same group so they report the harrier to each other? Am i better using invisible objs in the sky and have them engage that? Cheers GC
  18. Cloughy

    It is beyond me....

    If you try obj1 == 1 in the cond field and have your set obj complete code in the activation, when someone JIPs, it should fire all these triggs that have been fired and set their briefing. Cheers GC
  19. Cloughy

    Hint player name

    If you are team leader, and are still team leader on respawn, instead of player or soldier1, use 'leader group1', where group1 is your group. I have heard that respawned units are created and not copied in anyway, so it doesnt have a name. Cheers GC
  20. Might be the way the 1.05 dedi handles the player, cause the player is local to the client machine, not the server. Try setting your team to say 'Group1', then use Cond: (alive chopper1) and (leader group1 in chopper1) Init: chopper1 FlyInHeight 80; Or if you dont have many playable units (1-5) try naming them each and check if they are in the chopper. Also if its a big group, try using the ({_x in chopper1} count units group1 == {alive _x} count units group1) in the cond field. This was given to me in a prev post, searching for similar querys may help your plight as well. Cheers GC
  21. Cloughy

    Playmove, Switchmove examples

    A quick search of this forum found, http://community.bistudio.com/wiki/ArmA:_Moves There is also a demo mission somewhere that lets you see all of them. Im sure there will be a url kicking around. Cheers GC
  22. It´s useful for having units defend a camp for example. They will not move out as with the guard WP but only engage if there is an imminent threat around their sentry area. With guard WP the units will detect if another unit of their class has been killed and will move out to engage, no matter if the unit of their class has been killed near them, or 2 kilometers away. By class, do you mean infantry, armoured, air, because a sniper will hunt you down regardless of any other snipers on his side being KIA. Cheers GC
  23. Cloughy

    Pls help with my script

    Thanks, Sorted it now i used ({_x in list lz2} count units group1 == {alive _x} count units group1) Where lz2 is the trigger. Cheers For the Help. GC
  24. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _Group = _this select 0 _grUnits = units _Group _grTrig = list lz _i = 0 #LoopStart _Max = count _grUnits _grTrig = list lz ?(((_grUnits select _i) in _grTrig) && (alive (_grUnits select _i))):_i = _i + 1 ~1 ? _Max > _i : goto "LoopStart" ? _Max =< _i : intrig = 1; publicVariable "intrig"; Hint "script finished" Exit Where lz is the trigger where i want to know if all lads are in. Prob is(used to work) I see the hint message, but the variable isnt set. ie my choppers dont go, but if i use my radio trigger to set the var, intrig =1; publicvariable "intrig"; the helos take off. My MP coop is running on arma_server.exe dedi. Is there any issues with global vars being set in scripts, rather than a trigger? Cheers GC Any help.
×