I just lost my pants.

Posted by Hydra on April 7, 2009, 9:44 p.m.

Hai!, And Hello to all of you.

I just got gary's mod :) plus I'm working on an rawrsome game.

That i need help in. You see I'm trying to make a weapon swaping system. Anyone think they could help?

current variables.

Quote:

global.gun = 0 //MAIN GUN

global.gun0 = false

global.gun1 = false

global.gun2 = false

global.gun3 = false

global.gun4 = false

global.gun5 = false

global.gun6 = false

global.gun7 = false

global.gun8 = false

global.gun9 = false

Any ideas?

Comments

Iluvfuz 15 years, 7 months ago

I did this for my game, Paroxysm:

CREATE:

global.weapon

global.maxweapon = 11 //Number of weapons you have

PLUS ONE WEAPON

if global.weapon < global.maxweapon

global.weapon += 1

if global.weapon = global.maxweapon

global.weapon = 0

MINUS ONE WEAPON

if global.weapon > 0

global.weapon -=1

if global.weapon = 0

global.weapon = global.maxweapon

STEP

if global.weapon = 0

global.gun = 1

else

global.gun = 0

if global.weapon = 1

global.gun0 = 1

else

global.gun0 = 0

//ETC

Paroxysm: http://gmc.yoyogames.com/index.php?showtopic=423293

Download: http://willhostforfood.com/?Action=download&fileid=60764

flashback 15 years, 7 months ago

…you're aware that false effectively IS zero, yes?

Hydra 15 years, 7 months ago

hmh.. i didn't not know.

sk8m8trix 15 years, 7 months ago

I suggest you use an array before someone kills you.

Xxypher 15 years, 7 months ago

I have a really good one. I may send it to you tomorrow.

TDOT 15 years, 7 months ago

Yeah, heed sk8's advice. Switch to an array asap.

MMOnologueguy 15 years, 7 months ago

do this:

Quote:

var hax;

hax=0

repeat 11

{global.gun[hax]=0

hax+=1}

Juju 15 years, 7 months ago

…you're aware true is effectively IS one, yes?

RC 15 years, 7 months ago

I myself wasn't aware of this until tomorrow.

PY 15 years, 7 months ago

not effectively, it IS 0 and 1.