How do I create multiple builds?

0 favourites
  • 4 posts
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • I don't know what I'd do without these forums..

    Okay, so in my game, I want there to be multiple builds. One of them would have bullets that can bounce, another one would have a shotgun like gun, etc.

    How could I make it so you can only use one? For example, at the start of the round, you choose one of the builds, and use it until the round ends, and then you have the option to change, if you'd like...

    I tried disabling groups, although I couldn't get that to work, (I might've just been doing it wrong though).

  • So players should be able to select a build/class at launch and then have different guns, right?

    You can make a menu or something where players select their build and store the selection in a global variable. Like a build name. Or add it as instance variable to the player sprite.

    And then just add a condition where the variable is compared to the attack actions. like:

    Build = "Bouncy Bullet" AND Fire button is pressed > Spawn bullet with bounce

    Build = "Shotty" AND Fire button is pressed > Spawn multiple small bullets for Shotgun

    Build = "Bomb" AND Fire Button is pressed > spawn a bomb

    etc.

    Or "On Attack Button Pressed" add sub conditions for every possible build

    On Attack Pressed

    Build = "Bouncy" | Do this

    Build = "Shotgun" | Do this

  • Sorry I took so long to reply, I was busy over the weekend. Yes though, you get to choose different builds with different mechanics.

    Thank you for the response, I'll try it out, and if I can't get it to work, I'll leave a reply.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Okay, so I used "On Mouse clicked" along with sub events checking what the variable is, to spawn a certain bullet. However, I can't figure out how to "turn off" bullets. Such as, making it so only regular bullets can spawn, if that makes sense? I could've just coded it wrong, but I'm not sure what to do.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)