Announcement

Collapse
No announcement yet.

Scripting!

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

  • Scripting!

    Just want to point out to you the Script Data Base that anyone can add to or use from

    http://www.tacticalgamer.com/arma-mi...ml#post1573084

    Go nuts! lets get some good scripts added, i will try and keep the index up to date to help search for scripts easier!!

  • #2
    Re: Scripting!

    Thanks for the heads up browna, just had it to the favourites in case I ever venture into mission making.
    sigpic

    PR BF2 Alias: NewOrder_JoyDivision

    Comment


    • #3
      Re: Scripting!

      Not sure if we have somekind of ask about scripts thread but I need to know what is wrong with this script

      Code:
      private["_time", "_End", "_variable"];
      _variable= _this select 0;
      _End=0;
      _time=0;
      hint "Start";
      
      while {_End==0} do {
      	_time= _time + 1;
              hintSilent format ["%1", _time];
      	Sleep 1;
      };
      
      hint format ["Player %1  time was %2",(name player) , _time];
      And in trigger activation field:
      Code:
      null = [this] execVM "counter.sqf"
      Still learning this stuff... :)
      sigpic
      Programming today is race between software engineers striving to build bigger and better idiot-proof programs, and Universe trying to produce bigger and better idiots. So far, Universe is winning.

      Comment


      • #4
        Re: Scripting!

        _time is a reserved variable which returns the time passed(in seconds) since the script started running. Change it to something else and the script should work.

        Then there's this, which isn't an error but still it's imho bad practice to assign a variable named null a value:
        Code:
        null = [this] execVM "counter.sqf"
        Nothing is needed here, as the return value from execVM is just discarded if you don't "catch" it.

        Comment

        Connect

        Collapse

        TeamSpeak 3 Server

        Collapse

        Advertisement

        Collapse

        Twitter Feed

        Collapse

        Working...
        X