Jump to content

InsanityGamer

Member
  • Content Count

    2
  • Joined

  • Last visited

  • Medals

Posts posted by InsanityGamer


  1. Essentially i'm try to make my own take on an invade and annex server thats team oriented. currently im working on adding a flagpole teleportation mechanic that will teleport you to your squad leader if you have a squad leader and will get you in the fight faster. so ive spent the better part of the day doing this....

     

    Quote

    this addAction ["<t color= '#FFFF00'>Teleport to Squad Leader</t>", {
     
     if ((SquadLeader_1) == (_this select 1)) then{
     hint "You are the Squad Leader, Figure out a ride for your squad!";}
     else{
      if ((SquadLeader_2) == (_this select 1))
      then{
      hint "You are the Squad Leader, Figure out a ride for your squad!"
      }
      else{
       if(group (_this select 1) == group SquadLeader_1)
       then{
       hint "You will be teleported in 10 seconds.";
       sleep 1;
       hint "You will be teleported in 9 seconds.";
       sleep 1;
       hint "You will be teleported in 8 seconds.";
       sleep 1;
       hint "You will be teleported in 7 seconds.";
       sleep 1;
       hint "You will be teleported in 6 seconds.";
       sleep 1;
       hint "You will be teleported in 5 seconds.";
       sleep 1;
       hint "You will be teleported in 4 seconds.";
       sleep 1;
       hint "You will be teleported in 3 seconds.";
       sleep 1;
       hint "You will be teleported in 2 seconds.";
       sleep 1;
       hint "You will be teleported in 1 second.";
       sleep 1;
       
       (_this select 1) setPos (getMarkerPos "SquadTeleportLocation_1")
       }
       else{ 
        if(group (_this select 1) == group SquadLeader_2) 
        then{
        hint "You will be teleported in 10 seconds.";
        sleep 1;
        hint "You will be teleported in 9 seconds.";
        sleep 1;
        hint "You will be teleported in 8 seconds.";
        sleep 1;
        hint "You will be teleported in 7 seconds.";
        sleep 1;
        hint "You will be teleported in 6 seconds.";
        sleep 1;
        hint "You will be teleported in 5 seconds.";
        sleep 1;
        hint "You will be teleported in 4 seconds.";
        sleep 1;
        hint "You will be teleported in 3 seconds.";
        sleep 1;
        hint "You will be teleported in 2 seconds.";
        sleep 1;
        hint "You will be teleported in 1 second.";
        sleep 1;
        
        (_this select 1) setPos (getMarkerPos "SquadTeleportLocation_2")
        } 
        else{
         if(group (_this select 1) == group COC
         ) 
         then{hint "You're an officer. Just order your own ride."
         } 
         else{
          if (group (_this select 1) == group Pilot) 
          then{hint "Why dont you go take your helicopter?"} 
          else {
           if(group (_this select 1) == group Recon)
           then{hint "You're Recon, Right? Looks like your humping it  in."}
           else{hint "Theres no squad leader on right now"}
          };
         };
        };
       };
      };
     };
    }]

    im sure some of you are gagging at that, sorry im not very proficient in eden editor....or anything particularily...

    nonetheless this works as intended except it'll throw an error if there is nobody playing the character with their specific variable attached IE; SquadLeader_1, SquadLeader_2, Pilot, COC, Recon. for what i intend that's fine but i'd like to clean it up and offer a "Teleportation is down right now" for the characters that can teleport atleast. i've been trying to find some way to integrate try throw catch, but cant seem to find a way to set it up proper.

     

    any tips?


  2. If i wanted to make a script that requires a satchel to be placed on a radio tower to destroy it, what would be a method i could use?

     

    Basically im trying to make it so players cant just shoot it with CAS or Artillery. someone has to physically walk up and place a satchel on the tower to blow it up.

     

×