Hit Points problem!
FungoEntertainment
Member Posts: 36
Hey!
I was working on my brand new game when I felt the need to make a boss monster. Unlike other enemies, boss actors require more shots to be taken down. That's when my problem appeared: "How do I make a "Boss" actor have more hit points?"
-Thanks!
I was working on my brand new game when I felt the need to make a boss monster. Unlike other enemies, boss actors require more shots to be taken down. That's when my problem appeared: "How do I make a "Boss" actor have more hit points?"
-Thanks!
Comments
If you want the boss to say, have 40 hits before he dies, then change the number on that attribute to 40
Then create a rule within the boss when it overlaps with the player's weapon or bullet or whatever it is attacking him: Change attribute self.Bosshealth to self.bosshealth -1
You can tweak the number of health points taken away depending on what weapon attacked him as well
Hope this helps!
Rule: When self.Bosshealth = 0
Destroy this actor
Animate: however you want him destroyed
Also forgot to add: In the rule where boss health is taken away, you might want to add:
Rule: When Boss overlaps or collides with : Player weapon (whatever it is that's attacking the boss)
ADD THIS: When self.bosshealth is > 0 : change attribute self.bosshealth to self.bosshealth-1
That tells the program not to keep counting down below zero when the boss is hit
Hope all this helps!
So click on the boss actor itself, and you'll see a list of attributes
From there you click on the + sign to add an attribute. It will ask you what kind, you say "integer"
Then you will see the attribute you added and it's called "new attribute"
you want to rename that to "boss health" and also click on the number next to it and change it to however many hit points you want the boss to have
If you want the boss to have 40, just click on it, and type in 40
Then when you create a rule that says the boss health is minus 1 when he gets hit, you go into the rule: When boss overlaps or collides with player weapon
Change attribute: click on the box, it will open up the attribute browser
Then click on the name that should be on the bottom that says "boss" or whatever the name of your boss is
Then you find the attribute that you created "boss health"
So the rule becomes: Change attribute: self.bosshealth to self.bosshealth -1
Also: Here's a link to a picture from one of gamesalad's template shooters:
http://img534.imageshack.us/img534/7861/screenshot20100405at120.png
There is a perfect example in there of Boss hit points or boss health, check out the rules within that shooter template to learn how to take boss health away k