Results 1 to 5 of 5

Thread: Random Weapon Spawning Script

  1. #1

    Random Weapon Spawning Script

    ArmA 3 Random Weapon/Item Spawner

    Well, since there is no weapon spawning script (that im aware of) for ArmA 3 yet, I decided to make one.

    This script basically just uses weapon holders to spawn stuff on the ground at the defined game logic (it runs the script on every one of the game logics so the more options you put in, the wider variety of things it will spawn).
    You can use this as one script, but in my opinion, it might be better to clone the script then change stuff in the copies of it and run them on different game logics to avoid the chance of having like 40 guns and 50 ammo magazines spawn on one game logic.
    Also worth saying that sometimes behavior of things spawned is... odd (like having a gun spawn then fly off into the sky, or have the gun magically floating in the air all by itself...)

    as i said above, just put down a game logic in the editor and in its init box put:

    nul = [this] execVM "randomspawn.sqf";

    You can add more stuff to this. Just get the classname for the item/gun/magazine and copy and paste a line thats already in the script, change the random numbers, and put in how many of the item will spawn if its picked. It doesn't have to be a gun either, it can be a backpack or a vest or a uniform as well (or even a custom item like a bandage or food can from DayZ).

    http://www.armaholic.com/page.php?id=21513
    Last edited by austin_medic; Jul 10 2013 at 07:38.

  2. #2
    Quote Originally Posted by austin_medic View Post
    nul = [this] execVM "randomspawn.sqf";
    For anything you're releasing for others to use you'll want to use a less generic name than "randomspawn". For any functions you create and especially for the final script you'll want to tag the names. AUSMD_randomWeaponSpawn.sqf or AUSMD_fnc_randomWeaponSelect or something. I'd head over to OFPEC and sign up for your own tag then rewrite your script to make sure everything you use in it is unique.

  3. #3
    Well, 9 times out of 10 if your script is decent somebody is just gonna steal it and claim its their anyways.... But if you share it usually you don't care if somebody steals it (which I don't)

    Thanks for linking that site anyways, I might sign up for a tag...

    EDIT: :/ kind of going off track now...
    Last edited by austin_medic; Jul 10 2013 at 08:09.

  4. #4
    i think he was more referring to the name you use as lots of others already use something like or similar to randomspawn.sqf so be unique so it does not conflict as per example AUSMD_randomWeaponSpawn.sqf , he was not referring to someone stealing it
    {God-Father} @ 1PARA Community
    Gaming Nights Current gaming Schedule on Dedicated Server

    Wednesday ------- 19:30 GMT ----- SAG Missions Various MODS
    Sundays ------- 19:30 GMT ----- SAG Missions Various MODS

    http://www.hq1para.org.uk/

  5. #5
    Anyway to Random Spawn Items in Units with something like this?
    A random number of Items you may setup and the Items themselves?

    Example: You take down an enemy in the bush, you then search the
    body and find some odd random Items/Weapons/etc. Playing around
    with Scorch's Misc Item Pack. Would be cool if you could search
    bodies for Intel and things that you did not pre-place there in editor.
    ~ R. Von Quest
    "Po-lice that moo-stash!!!!"

    Make Arma Not War: Support & Vote!

Similar Threads

  1. Select & Give Player Random Weapon, Mags & Items Script. Need Help please!
    By ShinShin in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 9
    Last Post: Sep 8 2013, 13:54
  2. Random Spawning
    By halex1316 in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 14
    Last Post: Nov 27 2012, 03:23
  3. spawning random ai with a script attached to tehm
    By |TW| Quintus in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 0
    Last Post: Jan 7 2011, 09:46
  4. Random MP Spawning?
    By PiNs_Da_Smoka in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 5
    Last Post: Jul 4 2009, 23:56
  5. need help spawning a random object
    By madmedic in forum OFP : MISSION EDITING & SCRIPTING
    Replies: 9
    Last Post: Oct 11 2005, 03:44

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •