Heart Containers
butterbean
Member Posts: 4,315
So I've decided instead of the health bar, to do the heart containers, only I've changed the graphic to a vegetable to represent the players health status.
I created a global game attribute: "player health" as integer, and placed 3 in as the number of health allotted
I created the image prototype for the player's health, and sized it down to 25/25, and named it player health.
I created a behavior within that icon, and did the following: Replication direction: 90 Copies: I clicked on game, and the attribute game.health, and for spacing I typed in 32
I then went into my Actor (main character) and created a rule:
When attribute changes: player collides with instance type: "enemy" (in this case a bird), game.health-1
What happens in game?
All 3 icons disappear once the actor hits the bird, and isn't destroyed after 3 hits
What am I doing wrong here?
I followed the "cave adventure" game demo on GameSalad and checked everything
Am I missing something?
Any help is appreciated!
I created a global game attribute: "player health" as integer, and placed 3 in as the number of health allotted
I created the image prototype for the player's health, and sized it down to 25/25, and named it player health.
I created a behavior within that icon, and did the following: Replication direction: 90 Copies: I clicked on game, and the attribute game.health, and for spacing I typed in 32
I then went into my Actor (main character) and created a rule:
When attribute changes: player collides with instance type: "enemy" (in this case a bird), game.health-1
What happens in game?
All 3 icons disappear once the actor hits the bird, and isn't destroyed after 3 hits
What am I doing wrong here?
I followed the "cave adventure" game demo on GameSalad and checked everything
Am I missing something?
Any help is appreciated!
Comments
To raise my Blood pressure a few more points, and for kicks, I tried Game.Health = -1 and got the same results with a higher Blood pressure
Still eliminates all 3 icons, and player is still allive after 3 hits:(
I'm getting frustrated with this b/c I feel like it's something very basic I'm missing
I kept all the attributes and rules the same, but I think dragging the image into a certain area on the screen made it work for some reason!
I spent so much time on this, but feel accomplished that at least I tackled this one task which leant itself to be more difficult than I could have imagined!
Thanks 4 your help everyone!
So fairly soon! I have 2 unfinished levels, and just trying to create the basics!
I don't know if you'd find this useful, but generally, I try and get one level completed to as good as finished as it's going to be.
It means less work in the long run I reckon as you only have to iron out the gameplay and bugs for one level. Other levels can be built on top of that (as in, if your basic game mechanics work, new levels can introduce new enemies).
I guess it's personal choice though
Now! Back to making your game please!
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
So yes! My focus is still that, but I also need graphics to create more gameplay as I've only drawn some of the basics
Hopefully the 1st level will be near complete and I can put a demo up
Thanks for the advice!