Modme Forums

Random Starting Weapon Script

Game Asset Reversing | Releases


ConvictioNDR:

Simple script made for Calumpit Chaos that gives every player a random starting weapon. You choose which weapons to add to the list. All instructions for setup are at the top of the script.
Download: https://mega.nz/file/5cpkwKTY#wFcM5iaHSkkey5U6QXed1ZLFJLJUjjTVLNEUbLlczzk


IceGrenade:

Cool share man, I just do this, much more simpler and only 2 lines :)
just goes in main()

random_weapon_list = array("wpn_custom_viking_axe_01", "wpn_custom_viking_axe_02", "wpn_custom_viking_hammer_01");
level.start_weapon = ( getWeapon( array::randomize(random_weapon_list)[0] ) );


ConvictioNDR:

Cool share man, I just do this, much more simpler and only 2 lines :)
just goes in main()

random_weapon_list = array("wpn_custom_viking_axe_01", "wpn_custom_viking_axe_02", "wpn_custom_viking_hammer_01");
level.start_weapon = ( getWeapon( array::randomize(random_weapon_list)[0] ) );

I saw you did that in the Shrek map, which we enjoyed. The difference here is my script gives every player in coop a different random weapon to give each player a slightly different experience of the map and makes each coop game slightly different.


KillRideMasterJ:

Hey. so I love this script! super fun and fresh games. I have been having one issue though. every so often(feels like one of the options) it doesnt give me a gun. just the knife. and on certain occasions it wont let me buy anything. to fix it i just restart or give myself a weapon and it goes away. Thank you!


ConvictioNDR:

I no longer have the mod tools installed, so I can't help troubleshoot beyond this bit of advice.
You can add

wait 5;
self iprintlnbold(start_weapon);
after
self GiveWeapon( stabby ); 
That will print on the screen the weapon name that is causing the issue. It could be a typo in the weapon name, or the weapon isn't included correctly in your map's csv.