Simple attributes for creating a boss - can anyone help?
Hi there,
I am new to GS and I am looking for a tutorial to make a simple boss actor. Basically I just want a character who doesn't die on the first hit. How do I set up a rule that makes it so that the boss doesn't die until, say, after the 10th hit?
In saying this, I am only assuming that number of hits is the usual way one would set up rules for a boss actor - are there any other common ways?
I've looked at the boss's attributes for the 'shoot-em-up' template that comes free with GS but without explanation it isn't helping me.
Thanks for any help anyone can give me!
I am new to GS and I am looking for a tutorial to make a simple boss actor. Basically I just want a character who doesn't die on the first hit. How do I set up a rule that makes it so that the boss doesn't die until, say, after the 10th hit?
In saying this, I am only assuming that number of hits is the usual way one would set up rules for a boss actor - are there any other common ways?
I've looked at the boss's attributes for the 'shoot-em-up' template that comes free with GS but without explanation it isn't helping me.
Thanks for any help anyone can give me!
Comments
In the boss, you'll notice that under the image (top left) are some attributes. You can, as @tatiang noted, make your own by pressing the little '+' button in that section.
These are called 'self' variables.
Notice I made a new one called 'BossLife' and gave it a value of 10.
In the main rules section, the first thing I did was set the bosslife value to 10 again - this is in case the player restarts or dies before killing the boss.
The next section basically says:
If boss is hit by a bullet actor
CHANGE the value of bosslife to bosslife-1
This takes 1 off the boss health every time it's hit.
It *also*, for .1 seconds, changes the boss alpha to .5 - which is one way of showing it's been hit.
Lastly, there's a rule that states:
If Bosslife is less than or equal to 0, then destroy the actor.
Hope that helps!
QS