Ammo bar & actor question?
kevelation
Member Posts: 5
Can anyone answer my question?I'm trying to get my ammo bar health to integrate with my actor(player).I have a fire button joystick that triggers my actor to load an animation(lazer)(lazer sound)when touch is inside(stick2).when pressed it subtracts from my ammo bar-1.What im trying to figure out is when ammo bar =0 how can i make player stop loading animation(lazer)and replace the (lazer) sound with another sound (empty lazer click).any suggestions?
Comments
let me clarify my rules i am using.
My rules or firing the lazer are in the player (actor)i have 2 attributes:
when gamedistanceFromCenter2>0
Game.Stick2Grabbed is true
Timer for 0.5 sec.
spawn actor lazer
on stick 2 :
actor receives event : touch is pressed
change attribute game.ammo to game.ammo -1
play sound :lazersound
change attribute game.Stick2Grabbed to true
change attribute self.Snapto to false
does this make any sense.
p.s my beta of my game is on G.S called Ki-Enkis Journey.
when gamedistanceFromCenter2>0
Game.Stick2Grabbed is true
Timer for 0.5 sec.
spawn actor lazer(animation)
It is starting to make some sense ,I did not know where to control everything on the stick2 or in the player actor...
I added a rule in the player actor when all conditions are valid
game.ammo > 0
Timer for 0.5 sec.
spawn actor: lazer
position >x ^ y relative to actor
everything works great!!!
your the best..