RPG/Stat Question

EricTippettEricTippett Member Posts: 45
edited July 2012 in Working with GS (Mac)
Hey Everyone,
So I started to make a game where you shoot and take away health from enemies. I wanted to be able to upgrade the damage you do so I was going to store that in the player actor. But Actors cant take info from eachother, so how would I take away the health from the enemy with a number that will be upgradable?
This is something like an RPG where I cant just specify a certain amount, the amounts will change when upgraded.

Could someone tell me how to accomplish this or even post a tutorial on Youtube so I could follow along?

Best Answers

  • IsabelleKIsabelleK Posts: 2,807
    Accepted Answer
    Just work on game attributes, not on actor attributes.
  • IsabelleKIsabelleK Posts: 2,807
    Accepted Answer
    So, in that case use actor attributes for each enemy, not global attributes :)

Answers

  • EricTippettEricTippett Member Posts: 45
    Oh thats what I was doing, but there were some problems with using game attributes

    There are many randomly spawned enemies of the same type, there is only 1 enemy health attribute. So how can I make all those spawned enemies use that 1 health attribute and not share it. Right now they share it and when one dies they all die for the rest of the game.
  • EricTippettEricTippett Member Posts: 45
    Ah so the enemies should all have their own attributes in their actors.. and the player should have all his attributes in the game attributes, right?
    Okay so I think I have that down, but here is something I ran into.
    I have a rule that if the enemy self.health is 0 it will get destroyed.
    Before that I have a rule that says if the enemy actor collides with the bullet, then change self.health to self.Health-game.bullet

    the self.health is 1000 and the bullet is 1000 right now for testing so it should destroy it in one hit, but its not doing anything, however it is colliding and the bullet is disappearing. So did I write the self.Health - game.bullet wrong or what happened?
  • EricTippettEricTippett Member Posts: 45
    Ah, thanks I see what I did. For some reason it had everything as text in the Self.Health-Game.BulletDamage part.. so I just had to re click everything.
    Thank you for the help guys, I am just starting out with Game Salad. I may have some more questions soon!
Sign In or Register to comment.