Jump to content

OzeRick

Member
  • Content Count

    9
  • Joined

  • Last visited

  • Medals

Community Reputation

10 Good

About OzeRick

  • Rank
    Private
  1. Well the problem is that it is not working :0 If I brake the script apart and run the single parts it work's, but as a hole it is not. I think it is in the way I am useing the If, then, else, switch, but I have no idear. thats way I am asking for help
  2. HI all Sorry about all that. What I am trying to do is 1. spawn a object in a random area with a name,that part works no problem. 2. have it so that if you put say "ammor" for _type it will pick the correct path and spawn the required vehicles. 3.I am runnig it from a trigger from radio just for testing. 4.Well I am really just trying to learn how scritping work thanks
  3. I am trying my hand at some more scripting and have come to a holt and need help:o Could some one have a look and tell me what I am doing wrong thanks if (!isServer) exitWith {}; _pos = _this select 0; _area = _this select 1; _Num = _this select 2; _dist = _this select 3; _side = _this select 4; _type = _this select 5; private ["_pos","_area","_Num","_dist","_side","_type"]; _skill = [0.6,1]; _a = "SkeetDisk";// obj to use as spawn place. for [{_i = 0},{_i < _Num},{_i = _i + 1}] do { _newpos = GetPos _pos; _posX = _newpos select 0; _posY = _newpos select 1; if ( isNil "ob_u" ) then { ob_u = 0 }; ob_u = ob_u+ 1; _mar = format["ob%1", ob_u ]; _mar = _a createVehicle[(_posX + random _area)-_area/2, (_posY + random _area)-_area/2,0]; switch (_side) do { case west: { switch (_type) do case ammor: { // spawn west ammor _units = ["HMMWV_Base","M1A1","APC"]; _grp = [getPos _mar,180,_units,_side] call bis_fnc_spawnVehicle; [_grp, ( getPos _mar), _dist] call BIS_fnc_taskPatrol; sleep 0.8; }; case air: { //spawn west air _units = ["A10","AV8B2","F35","AH1Z","AH64D","UH1Y","UH60"]; _grp = [getPos _mar,180,_units,_side] call bis_fnc_spawnVehicle; [_grp, ( getPos _mar), _dist] call BIS_fnc_taskPatrol; sleep 0.8; }; case man: { //spawn west men _units = 2 + random 20; _grp = [getPos _mar,180,_units,_side] call bis_fnc_spawnVehicle; [_grp, ( getPos _mar), _dist] call BIS_fnc_taskPatrol; sleep 0.8; }; case east: { switch (_type) do case ammor: { //spawn east ammor _units = ["BMP3","BTR90","T72_RU","T90","GAZ_Vodnik","GAZ_Vodnik_HMG"]; _grp = [getPos _mar,180,_units,_side] call bis_fnc_spawnVehicle; [_grp, ( getPos _mar), _dist] call BIS_fnc_taskPatrol; sleep 0.8; }; case air: { //spawn east air _units = ["Mi17","Mi24","Su25","su34"]; _grp = [getPos _mar,180,_units,_side] call bis_fnc_spawnVehicle; [_grp, ( getPos _mar), _dist] call BIS_fnc_taskPatrol; sleep 0.8; }; //spawn east men case man: { _units = 2 + random 20; _grp = [(getpos _mar),_side,_units, [], [], _skill] call bis_fnc_spawngroup; [_grp, ( getPos _mar), _dist] call BIS_fnc_taskPatrol; sleep 0.8; }; };
  4. Hi all I thort that I would share this script that I have made. I know that it may not be up to the high standards of some of the scripts on here :0 but if it helps some on with there missions all the better. The reason that I made the script was that I could not find what I was after and I found it a good learning process. Any how here it is have fun with it.
  5. HI All After reading this thread, I went and looked for some old stuff that I had. 4 hours later a working head tracking system. Thanks for the Info it makes the game a HOLE LOT MORE FUN :O
  6. HI all The below works well and I have used it a lot.
  7. Hi all I have been playing around with the below script to get 2 planes to spawn and complete the run but I can only get one to spawn. Could some please let me know if I am heading in the right direction or if I am barking up the wrong tree with he way I am doing it Thanks Regards OzeRick setfire=true; titleText ["Click on the map to set your firedirection","plain down"]; onMapSingleClick "ASTarget setPos _pos; setfire=false"; @!setfire; "Firedirection" setmarkerpos getPos ASTarget; onMapSingleClick ""; titleText ["", "plain down"]; ;=========DEFINE======================= _dropPosition = getpos ASTarget; ~0.5 _dropPosX = _dropPosition select 0; _dropPosY = _dropPosition select 1; _dropPosZ = _dropPosition select 2; ~0.1 _planespawnpos = [_dropPosX + 4000,_dropPosY,_dropPosZ + 350]; _pilotspawnpos = [_dropPosX + 4000,_dropPosY,_dropPosZ + 350]; ;=========CREATE======================= _PlaneG = creategroup WEST; _plane = createVehicle ["AV8B",_planespawnpos,[], 0, "FLY"]; _plane setPos [(getPos _plane select 0),(getPos _plane select 1),900]; _pilot = "Pilot" createUnit [getMarkerPos "Firedirection", _PlaneG, "P1=this"]; _Plane setVelocity [100,0,0]; _dropPosition = getpos ASTarget; ~0.4 P1 moveinDriver _plane; P1 setDamage 0; P1 action ["gear_up", vehicle P1]; _plane flyinHeight 100; _plane setSpeedMode "full"; #CHECK P1 doMove getPos ASTarget; P1 doTarget ASTarget; P1 doWatch ASTarget; ? (_plane distance ASTarget) < 2550 : goto "DROP" goto "CHECK" ~0.5 ;=========DEFINE======================= _dropPosition = getpos ASTarget_1; ~0.5 _dropPosX = _dropPosition select 0; _dropPosY = _dropPosition select 1; _dropPosZ = _dropPosition select 2; ~0.1 _planespawnpos = [_dropPosX + 4000,_dropPosY,_dropPosZ + 350]; _pilotspawnpos = [_dropPosX + 4000,_dropPosY,_dropPosZ + 350]; ;=========CREATE======================== _PlaneA = creategroup WEST; _plane = createVehicle ["AV8B",_planespawnpos,[], 0, "FLY"]; _plane setPos [(getPos _plane select 0),(getPos _plane select 1),910]; _pilot = "Pilot" createUnit [getMarkerPos "Firedirection", _PlaneA, "P2=this"]; _Plane setVelocity [100,0,0]; ~0.4 P2 moveinDriver _plane; P2 setDamage 0; P2 action ["gear_up", vehicle P2]; _plane flyinHeight 100; _plane setSpeedMode "full"; #CHECK1 P2 doMove getPos ASTarget; P2 doTarget ASTarget; P2 doWatch ASTarget; ? (_plane distance ASTarget) < 2550 : goto "DROP" goto "CHECK1" ;=========FIRE======================= #DROP _i = 0; _plane flyInHeight 100; _plane setPos [(getPos _plane select 0),(getPos _plane select 1),100]; ~13 #FIRE _i=_i+1; _plane fire "BombLauncher"; ~0.2 ? _i <= 6 : goto "FIRE" ;=========FLY AWAY======================= ASTarget setPos [0,0,0]; "Firedirection" setMarkerPos [0,0]; _plane setSpeedMode "Full"; ~2 _plane flyInHeight 300; P1 doMove getPos ASTarget; #Check2 _plane setDamage 0; P1 setDamage 0; ? (_plane distance Player) > 1000 : goto "ENDE"; goto "Check2" ASTarget setPos [0,0,0]; "Firedirection" setMarkerPos [0,0]; _plane setSpeedMode "Full"; ~2 _plane flyInHeight 300; P2 doMove getPos ASTarget; #Check3 _plane setDamage 0; P2 setDamage 0; ? (_plane distance Player) > 1000 : goto "ENDE"; goto "Check3" ;=========DELETE======================== #ENDE; deleteVehicle _plane; deleteGroup _PlaneG deleteVehicle P1; deleteGroup _PlaneA deleteVehicle P2; exit
  8. OzeRick

    Vehicle drop from C130

    Thanks for the Help It helped out a lot and it is also helping me to understand the coding side of things Once again thanks
  9. OzeRick

    Vehicle drop from C130

    Hi all I am very new to this and I have got the scrip to work and it great but for the life of me I can not work out how to get to to drop any were on the map that I want it to duing the game. Just like you do for calling in Artilley Could some please help with a bit of scriping advice' :D
×