Author Topic: Seriously, a weapon randomizing script on spawn.  (Read 923 times)

A randomizing script that gives you a random weapon out of a certain set of weapons. For example, you have an inventory already set up, but you want one weapon for everyone to be the variable. The variable weapon can only be out of a certain set of weapons, let's just call them gun1 and gun2. The variable weapon randomly gives each person one of these weapons each time they spawn. I don't think it should be limited to just a set of two weapons, though.

So bushido's weapon mod on his server.
Dowant.

I made something like this long ago, it gave you two weapons
It wasn't intended for release, though (the weapon list is hard-coded) and it's on another computer that I can't access right now

I made something like this long ago, it gave you two weapons
It wasn't intended for release, though (the weapon list is hard-coded) and it's on another computer that I can't access right now

Is it that hard coded that you can't just go in and add more lines of code to give you more weapons/a bigger variety?

You would have to open up the weapon files to find the item datablock name (or find it through various script means such as echo(findclientbyname("name").player.getMountedImage(0).getDatablock().item);  ), then you would add that to a list in the add-on.

As for changing the number of weapons it gives you, that would require more work.

I've also only used it as the only weapons, I haven't used it with static weapons chosen in the minigame settings. I don't know if it works, but if it doesn't it wouldn't be an issue to fix.


Easily done with VCE.
Though it would be more convientent to have an RTB pref for "Random Selections 1, 2, 3, etc" And however many weapon slots in each category you want to randomise from. Want 2 random weapons?  Have an event trigger weather you get a random weapon from Random Selection List 1, 2, 3, etc. (blank box 1 after the GetRandomSelection event) and in blank box 2 you would put numbers 1-5 depending on how many inventory spaces of random weapons you want. What would also be nice is a check-box in RTB prefs that makes sure you don't get 2 of the same weapon. Or when unchecked you could get 2 of the same weapon (incase you got grenades in the selection lists or something)

This sounds totally possible and the above explained way sounds like a great way to go about doing it.

Though it would be more convientent to have an RTB pref for "Random Selections 1, 2, 3, etc" And however many weapon slots in each category you want to randomise from. Want 2 random weapons?  Have an event trigger weather you get a random weapon from Random Selection List 1, 2, 3, etc. (blank box 1 after the GetRandomSelection event) and in blank box 2 you would put numbers 1-5 depending on how many inventory spaces of random weapons you want. What would also be nice is a check-box in RTB prefs that makes sure you don't get 2 of the same weapon. Or when unchecked you could get 2 of the same weapon (incase you got grenades in the selection lists or something)

This sounds totally possible and the above explained way sounds like a great way to go about doing it.

or in slayer

Though it would be more convientent to have an RTB pref for "Random Selections 1, 2, 3, etc" And however many weapon slots in each category you want to randomise from. Want 2 random weapons?  Have an event trigger weather you get a random weapon from Random Selection List 1, 2, 3, etc. (blank box 1 after the GetRandomSelection event) and in blank box 2 you would put numbers 1-5 depending on how many inventory spaces of random weapons you want. What would also be nice is a check-box in RTB prefs that makes sure you don't get 2 of the same weapon. Or when unchecked you could get 2 of the same weapon (incase you got grenades in the selection lists or something)

This sounds totally possible and the above explained way sounds like a great way to go about doing it.
And it wouldn't break or mess up other variables ever half hour.

or in slayer

Yeah, it would be nice to have something like that in Slayer - choose a weapon named "Random" and somehow choose what weapons can be randomly chosen.

if you can get me something that will list all of the enabled weapon images, then i'll do this for you

if you can get me something that will list all of the enabled weapon images, then i'll do this for you

i'm not sure what's the point of this, as it should be compatible with any weapon image and shouldn't already have weapons set in it...

Yeah, it would be nice to have something like that in Slayer - choose a weapon named "Random" and somehow choose what weapons can be randomly chosen.

I think there should be a tab for it

you get to set a list for the different weps to be used

use the code name though

"rocketlauncher, faecpwner, autocannon" and you'd type it into a text box

I think there should be a tab for it

you get to set a list for the different weps to be used

use the code name though

"rocketlauncher, faecpwner, autocannon" and you'd type it into a text box

I think anything simple to start out with would be nice, I think the slayer thing would be something extra, though it would be nice. Maybe it could be something Greek2me could implement as an idea, but it's probably unlikely.

I really would hate for this to die. This would revolutionize TDM and more, making it easier/faster to get into the game. Instead of just giving everyone the same, boring load out, or making a slow class system.

DrenDran's is ok, but the fact that it can't be saved, and you have to take time to type the class out might be crucial time you could die. I'll use it for now, but this idea needs to be for public use.