Math prototype

Information: The EMERGENCY community board is completely free and is financed by advertisement. Please deactivate adblocker if you use this site. Thank you!
Note about the webdisk: Downloading larger files should be possible again.
  • Hello,


    I want for my alarmscript that the script automatically can choose between 10 prototypes.


    I search bit around and most likely i need use Math::rand()%x;


    Can somebody give me little help?


    My script right now:


    Code
                    ActorList l = Game::GetActors(SPAWNPOINT[rand() % 1]);
                    spawnpoint = *l.GetActor(0);
                    Vehicle v = Game::CreateVehicle("mod:Prototypes/Vehicles/103 Amb/Boxer.e4p", "ambu2");
                    Vector spawnpos = spawnpoint.GetPosition();


    Thank you.

  • This should do the trick, but I did not test this.

    bzHAdys.png

    Head of Scripting

    Head of Quality Management

    Head of "Da hab ich ein Semikolon / eine Klammer vergessen"

  • This should do the trick, but I did not test this.

    Thank you very much!! i go try it!