Announcement

Collapse
No announcement yet.

Side Specific Action/Scripts + two more things

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Side Specific Action/Scripts + two more things

    I know that |TG| has quite a stable of mission makers and am wondering if any of you guys know if/how to make side specific actions/scripts? *Clarification: I have an object place in game that requires defending by one side and removal by the other side. I need to add two actions to the object but deny the use of one action to each side respectively.

    Also does the ~(followed by number) work as a countdown in a script thus if I put ~180 the script wouldn't fire for 3 minutes?


    I am also wondering how to get a marker to follow an object? I believe it has something to do with getpos or setpos but haven't figured out which is which yet!
    sigpic
    Pride/Shame of the PLA

  • #2
    Re: Side Specific Action/Scripts + two more things

    As for the marker:

    you can use this command: "MARKERNAME" setmarkerpos getpos OBJECTNAME

    Comment


    • #3
      Re: Side Specific Action/Scripts + two more things

      are you coding in sqs or sqf? a word of caution: you can't find sqs commands/syntax in the BIS wiki anymore (there are only one or two ... ~ is one of them), the geeks at BIS say sqf scripts are run faster. SQS still works completely fine, but if you plan to do much scripting, you may wish to learn SQF Syntax, it's not terribly different... (and you can always post questions if you need to!)

      Anyhoo, try putting this at the top of a script (note that I AM writing in SQF format, I can hardly remember how to use SQS anymore :\ ):

      Code:
      if ((side player) == WEST) exitwith {}; //side can be WEST, CIVILIAN, EAST, or RESISTANCE
      i.e. if side of the player is 'west', exit script. Put code you want to run for all other players below. OR you could do:

      Code:
      if ((side player) == WEST) then
      {
          ...code to run;
          ...code to run;
      };
      i.e. if side of the player is 'west' run specified code.

      ~ is indeed a 'delay' command. In SQF, it is called sleep. instead of '~17.3' you'd type 'sleep 17.3;'

      with regards to markers tracking an object: use a While loop with the command Macolik mentioned (BTW, 'while' only executes if its {condition} somehow equates to "true" ... so by simply putting 'true' in there, it will loop forever):

      Code:
      while {true} do
      {
          "MARKERNAME" setmarkerpos getpos OBJECTNAME;
          sleep 2;
      };
      NOTE: there is a setmarkerpos command, and a setmarkerposLocal command ... if you use the first one, *everyone* will see it happen. The second one will only move it on the PC that the script is running on.

      feel free to figure out the SQS equivalent of my examples, or try to learn SQF & ask questions if you need to. hope this helps.

      Comment


      • #4
        Re: Side Specific Action/Scripts + two more things

        Thanks for the help. The trying to get a script to be side specific doesn't want to work for some reason so I decided to scrap that idea and just stick to triggers. Hopefully by doing this, the mission won't be too intensive on people's computers.

        I have a couple of questions:

        a) I am using a ticket based system for revives and I use the variable ndeath, how do I create something or other that will tell a player upon their respawn how many tickets are left?

        b) Is it possible for me to enable only certain vehicles to respawn and how do I even implement vehicle respawn?
        sigpic
        Pride/Shame of the PLA

        Comment

        Connect

        Collapse

        TeamSpeak 3 Server

        Collapse

        Advertisement

        Collapse

        Twitter Feed

        Collapse

        Working...
        X