Weapons Switch Button
derka6391
Member Posts: 31
I have a actor using a shotgun and also a sub machine gun. I tried to make a button on the game scene that shows a shotgun but when pressed it changes to the sub machine gun and the actor does also. I uploaded pictures of my code. I changed the attribute to (game.Weapons-1)%2. with Weapons being a integer of 1. Thank you.
Answers
The second picture of code looks good but it would be simpler if you just made two rules. 1) If game.weapons=1 and key A is pressed change game.weapons to 2
2) If game.weapons=2 and key A is pressed change game.weapons to 1
Hope this helps!
And i have been trying to upload picture for a while but I couldn't figure it out how did you do that?
drag and drop. How would the attribute increment without a change attribute?
I did what you said and it didnt work, uploaded pictures.