196
Ask a Question / Help with behaviors and passing attributes
« on: January 07, 2015, 04:58:37 am »
I am trying to set up behaviors for my game and have:
Enemy Health - Attached to Actor = to knock energy off / kill enemy actors
Quasi_Weapon - Attached to Actor = has no code, just a 2 attributes to determine current weapon and damage points associated
Fire Weapon = Attached to Actor = to fire the bullets of which is current weapon
When the player actor collides with the icon (actor) for that weapon, it assumes it as 'current weapon' and puts those attributes into Quasi_Weapon
The problem I have is upon the Enemy Actor detecting collision, everytime I try to retrieve Damage_Points from the Weapon Behaviour to know how much to deduct it says behaviour not found. I take it this is because this behaviour is attached to Player Actor and not Enemy Actor. I'm totally stuck on this and can't figure out how to do it.
How do I get around this? Please help, it's driving me insane!!!
Enemy Health - Attached to Actor = to knock energy off / kill enemy actors
Quasi_Weapon - Attached to Actor = has no code, just a 2 attributes to determine current weapon and damage points associated
Fire Weapon = Attached to Actor = to fire the bullets of which is current weapon
When the player actor collides with the icon (actor) for that weapon, it assumes it as 'current weapon' and puts those attributes into Quasi_Weapon
The problem I have is upon the Enemy Actor detecting collision, everytime I try to retrieve Damage_Points from the Weapon Behaviour to know how much to deduct it says behaviour not found. I take it this is because this behaviour is attached to Player Actor and not Enemy Actor. I'm totally stuck on this and can't figure out how to do it.
How do I get around this? Please help, it's driving me insane!!!