Quantcast
Channel: GameSalad 101 — GameSalad Forums
Viewing all articles
Browse latest Browse all 8931

Toggle a weapons system between being active and inactive

$
0
0

I know I'm over thinking this and making it way more complicated than it has to be.
Please forgive me if this question has been posted a hundred times before.

I'm making a very basic shooter, enemies attack down from the top of the screen, you tap the enemy to shoot them, you start the game with very basic ammo and as you do better and make it further in the level and hit certain score goals, you arm special weapons that are on stand by until you touch said special weapon to arm and use it, in the same fashion as your regular weapon.

I originally had the game set up so it would force you to use these weapons when you hit the specific goals and it worked flawlessly but then i thought the game would be that much better if you had the option of activating and deactivating the weapons when ever you want, so your special ammo doesn't get wasted on enemies that can be simply destroyed using your basic ammo.

In no way do I know gamesalad as well as the majority of people on here which is why after hours and hours of frustration I turn to the community, this is how my weapons system is set up (its probably **** backwards) but I appreciate the help.

I have attributes set up as follows:
regular gun - Boolean true
oozie ready - Boolean false
oozie armed - Boolean false
special weapons - integer 0

(I have this set up on my regular bullet actor)
RULE
when SPEACIAL WEAPONS = 75
DO
change OOZIE READY to TRUE

(on the weapon button which you will touch on screen)
(touch to arm weapon)
RULE
when ALL the following are happening
when touch is pressed
if OOZIE READY is TRUE
DO
change OOZIE ARMED to TRUE
change REGULAR GUN to FALSE

(to disarm the weapon and switch back to regular gun)
RULE
when ALL the following are happening
when touch is pressed
when OOZIE ARMED is TRUE
DO
change OOZIE ARMED to FALSE
change REGULAR GUN to TRUE

If I disable the rule to disarm the special weapon, it works fine to activate the special weapon, and it shoots great, but if both rules are on then it wont switch to activate the weapon at all. obviously ive created a loop that cant be broken by setting it up this way but I cant figure out how to fix it, now my brain is mush as Ive spend way to long trying to figure it out and have caught myself in an endless loop of trying the same thing over and over again now.

Thanks for your time


Viewing all articles
Browse latest Browse all 8931