So basically what I want is a weapons selection option in my game, for example; press 1 and use the Pistol, press 2 and use the Uzi. Here is the code I’ve put in the timeline
[SIZE=1]_root.wpnChoice = 0;[/SIZE]
[SIZE=1][/SIZE]
[SIZE=1]//DESERT EAGLE[/SIZE]
[SIZE=1]if (_root.wpnChoice == 0) {
_root.shootspeed = 55;
_root.armorPierce = 0;
_root.crosshair._alpha = 60;
}[/SIZE]
[SIZE=1]//UZI
if (_root.wpnChoice == 1) {
_root.shootspeed = 100;
_root.armorPierce = 0;
_root.crosshair._alpha = 60;
}[/SIZE]
[SIZE=1][/SIZE]
If I change the _root.wpnChoice = 0 to 1 it works fine, but if i make a button or something in game and use
[SIZE=1]on (release) {
_root.wpnChoice = 1
}[/SIZE]
[SIZE=1][/SIZE]
It doesn’t work… I’m guessing it has something to do with that the game isn’t updating frequently or something. PLEASE HELP!! :*(
[SIZE=1]
[/SIZE]