How do I make a boss?

0 favourites
  • 8 posts
From the Asset Store
Boss Vs Warriors
$2 USD
60% off
Full game Construct 2 and Construct 3 to post on Google Play
  • I am looking to make a boss for a top down style adventure game. I want this boss to have different phases that it goes through and it will play animations as tells so the player can predict what it is going to do. I do not want the boss to do the same phase more than once in a row. Does anyone have any good ideas on how to achieve this?

  • You could use instance variables on the boss for what phase it's in. Go to the layout, and click your boss sprite. To the left you'll see where you add behaviors and what not. Add an instance variable called phase. You can use either a number, or a string. Set the starting phase, could be anything, call it "form 1". Then you would just use that instance variable in your event sheet to do what ever you want. You could do something like every tick, add another condition, click your boss sprite, go to compare instance variable = "form 1" -> action: set boss animation form 1. It might just be glowing red, or whatever.

    Of course this is a bare bones starting point. You'll want to use variables like this to decide what animation is playing, and use events to control the flow of form changes, and what not, but once you learn what I'm talking about the picture will come a little clearer.

    Also as a note you can use events to set this variable to something else. Just make the conditions, the action will be in the sprite, set instance variable..

    Variables are your friend for helping control flow, and keeping track of states.

  • yeah I been doing something like that but the way I am doing it makes the boss repeat the same action on random, I think my problem is when i select to do another phase.

    As an example I have a instance variable called phase on the boss and while than = 0 the boss will do a animation then change phase to a random number based on how many phases I have total. At the end of each phase I have it change Phase back to 0.

    What my problems are is it will select to do the phase that it did before again so it will go from 0,1,0,1,0,1 and sometimes it will rarely go to the other phases.

    Another problem I have is it will not full finish a phase and try to jump to another one. ( this has to be a problem with the way I set up what makes it change.)

  • every tick set the phrase number to random and then you can also do "Every X Seconds".

    For the X put Random (10,20) (Or however long you want the time between attacks to be.)

    and than for you action just make the boss do his attack and phrase. To make him not do the same attack twice you add another variable for "Last attack used".

    Everytime the boss uses an attack set the Last Attack Used to what every phrase number that was and then add a condition to the attack checking if the new random number is NOT equal to the current one.

  • Check out this capx. It's not perfected yet, but it's a start on phases. I'm gonna create my own thread to get suggestions on it. I've got a lot to learn myself. It turned out to be an interesting project helping here. One thing, this is a little rough. In a professional project of my own I would have set the boss to near it's original position after any moving left, right, up, or down, but it's something to work with.

    https://www.dropbox.com/s/yvqcmko3sew70 ... .capx?dl=0

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you all for the help, I been working on using the phases for the boss for a bit now but I was wondering how others would do it. It gives me ideas on how to make the boss more dynamic.

    Currently my boss is set up using animations to control when it changes it phases. This makes the phase take the same amount of time each time it goes into it which can make it easier for the player to predict the boss and fight against it. Something I did is make it where the boss has a default phase I call Phase0 and after each phase the boss goes into phase0.

    Phase0 is the phase that controls which phase it goes into next. What I want to do is make it where it cannot go into the same phase it was in before it went back to Phase0.

    So an example would be

    0,1,0,2,0,1,0,3

    0 is the default phase and 1-3 are the other phases.

    an example of what I dont want it

    0,1,0,1,0,1,0,3

    I do not want the boss to be able to keep repeating the same phase over and over again. This way it makes it more likely the player will see more of the bosses phases and keeps switching up what it is doing.

  • Thanks again for the feedback it is really helping me structure my boss better.

  • Yeah, the example isn't perfect, but at least it's a stepping stone. If you can debug it a little, you'll have a pretty good place to draw ideas from.

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