Jump to content

Silderoy

Member
  • Content Count

    158
  • Joined

  • Last visited

  • Medals

Everything posted by Silderoy

  1. this one should work, did not test though. waitUntil {!alive x};//that make the script hold untill the machine is dead. deleteVehicle y; write the name of the machine instead of "x", and replace the "y" with name of game logic.
  2. Silderoy

    Teleport to group

    I fixed the gear problem. well script works perfect! now just 20 more duplicates... with many many (I calculated 1300!!) small changes :butbut: Thanks for all the help Sel!
  3. Hey guys. I made a kind of a DM mission, where teams of 4 players fight each other. now I want to make a respawn system, where you respawn in a remote area of the map, and without any weapon. all players, no metter which team, will respawn there. then, if at least one guys from your group is alive, you will be teleported to the group leader, and will get a preset gear list. If the group leader is dead, you will teleport to the 2nd player, if he is dead then to the 3rd... If no group members are alive, you will teleport to one of 5 locations randomly. There are 5 teams, and in each team there is a TL, Grenadier, AR and medic. each one have a different gear preset... I know its complicated (very), but it would be awsome if someone can make it work. if you dont understand some part of my explenation about the respawn, pls ask. This is what I got untill now. this is an example for one of the units: while {true} do { waitUntil {!alive s1}; waitUntil {alive s1}; sleep 0.001; removeallweapons s1; removeallitems s1; sleep 0.001; if (alive s2 && (damage s2) < 0.55) then { s1 setPos [ getpos s2 select 0, (getpos s2 select 1) + 2, getpos s2 select 2]; } else { if (alive s3 && (damage s3) < 0.55) then { s1 setPos [ getpos s3 select 0, (getpos s3 select 1) + 2, getpos s3 select 2]; } else { if (alive s4 && (damage s4) < 0.55) then { s1 setPos [ getpos s4 select 0, (getpos s4 select 1) + 2, getpos s4 select 2]; } else { _randomrespawn = [s1] execVM "respawn.sqf"; }; }; }; . . . }; respawn.sqf: //store the name of the unit that activated the eventhandler _unit = _this select 0; //choose random spawn point _numb = round (random 5); // array of available spawn points marked with invisible H's _sp = [re1, re2, re3, re4, re5]; _undeadpos = (_sp select _numb); //for debugging hint format ["_sp = %1",(_sp select _numb)]; // move the repspawned unit to the selected invisible H _nul = _unit setPos (getPos _undeadpos); end; the only respawn that works is the respawn on s2... unit's name: s1. group: s1 (lead), s2, s3, s4. random respawn points: re1-re5.
  4. Silderoy

    Teleport to group

    thanks! and what about the gear? might have some addmagazine instead of addweapon and such, and the addmagazinecargo doesnt work.
  5. Silderoy

    Teleport to group

    would this work? so it chooses 0, 1, 2, 3 or 4, and cant be 5. _numb = floor (random 4.99); because _numb = floor (random 4); would make re5 allmost non active, as it would have to be 4 exactly in order to work. _numb = floor (random 5); would be mostly good, but will have a very small chance to get 5, and thats a problem...
  6. Silderoy

    Teleport to group

    The Switch cases work! Thank you!, but now I have a problem with the gear, and with the random respawn... the respawn problem, the random respawn sometimes tell me with the hint "_sp = <null>", and it doesnt teleport... rare but happens. the entire script, including Sel's fix: while {true} do { waitUntil {!alive s1}; waitUntil {alive s1}; sleep 0.001; removeallweapons s1; removeallitems s1; sleep 0.001; switch (true) do { case (alive s2 && (damage s2) < 0.55) : {s1 setPos [ getpos s2 select 0, (getpos s2 select 1) + 2, getpos s2 select 2]; Hint "Rs2";}; case (alive s3 && (damage s3) < 0.55) : {s1 setPos [ getpos s3 select 0, (getpos s3 select 1) + 2, getpos s3 select 2]; Hint "Rs3";}; case (alive s4 && (damage s4) < 0.55) : {s1 setPos [ getpos s4 select 0, (getpos s4 select 1) + 2, getpos s4 select 2]; Hint "Rs4";}; default {_randomrespawn = [s1] execVM "respawn.sqf"}; };//end switch case sleep 0.001; s1 addweapon "ACE_Earplugs"; s1 addweapon "ACE_GlassesBalaklava"; s1 addweapon "ACE_GlassesLHD_glasses"; s1 addweapon "ACE_GlassesTactical"; s1 addweapon "ACRE_PRC343"; s1 addweapon "ACE_Map"; s1 addweapon "ItemCompass"; s1 addweapon "ItemGPS"; s1 addweapon "ItemWatch"; s1 addweapon "NVGoggles"; s1 addweapon "Binocular"; s1 addmagazine "HandGrenade_West"; s1 addmagazine "HandGrenade_West"; s1 addmagazine "SmokeShell"; s1 addmagazine "SmokeShell"; s1 addmagazine "SmokeShell"; s1 addweapon "ACE_Rucksack_MOLLE_DMARPAT"; s1 addmagazinecargo ["HandGrenade_West",2]; s1 addmagazinecargo ["SmokeShell",2]; s1 addmagazinecargo ["SmokeShellRed",1]; s1 addmagazinecargo ["SmokeShellBlue",1]; s1 addmagazinecargo ["IR_Strobe_Marker",1]; s1 addmagazinecargo ["ACE_Bandage",10]; s1 addmagazinecargo ["ACE_Tourniquet",2]; s1 addweapon "RH_m4a1aim"; s1 addmagazine "30Rnd_556x45_Stanag"; s1 addmagazine "30Rnd_556x45_Stanag"; s1 addmagazine "30Rnd_556x45_Stanag"; s1 addmagazine "30Rnd_556x45_Stanag"; s1 addmagazine "30Rnd_556x45_Stanag"; s1 addmagazine "30Rnd_556x45_Stanag"; s1 addmagazine "30Rnd_556x45_Stanag"; s1 addmagazinecargo ["30Rnd_556x45_Stanag",3]; s1 addweapon "RH_m9"; s1 addmagazine "15Rnd_9x19_M9"; s1 addmagazine "15Rnd_9x19_M9"; s1 addmagazine "15Rnd_9x19_M9"; s1 addmagazine "15Rnd_9x19_M9"; s1 addweapon "ACE_HuntIR_monitor"; }; Could you help me fix any mistakes of weapons\magazines? and the cargo things doesnt work...
  7. Silderoy

    Teleport to group

    Yes, I am, but it doesn't show any errors. same with the rpt file...
  8. Silderoy

    Cz 83

    Awsome work! btw, what are the Classnames?
×