Author Topic: How to give random weapons on spawn using VCE?  (Read 1160 times)

I searched this, and it gave me one answer, but it didn't work.

detect when the player is spawned in some way - walking over a brick right after the spawn tends to work well
then generate a random variable, setting a variable to the lower value and then using random on it to the upper limit
then check that variable for it's value, giving a different weapon for each value

detect when the player is spawned in some way - walking over a brick right after the spawn tends to work well
then generate a random variable, setting a variable to the lower value and then using random on it to the upper limit
then check that variable for it's value, giving a different weapon for each value
that's what I was thinking. my choice for the brick would be a zonebrick, though, because onPlayerEnterZone is superior imo to onPlayerTouch

Thanks, but can someone give me an event example or something? I have no idea how to use this.

Thanks, but can someone give me an event example or something? I have no idea how to use this.
if nobody's done it when I get home later, I'll show you

input>player>VCE_modvariable[weapon][set][0]
input>player>VCE_modvariable[weapon][random][2]
input>player>VCE_ifvariable[weapon][==][0][3 4]
onvariabletrue>player>additem[gun]
onvariablefalse>player>VCE_ifvariable[weapon][==][1][5 6]
onvariabletrue>player>additem[rocket launcher]
onvariablefalse>player>additem[sword]

that would be a random chance between a sword, rocket launcher, and a gun