Help with destroy prob plz
Shadowghost135
Member Posts: 38
Hi again all,
Sorry I'm having to come back to the forums so much, I'm honestly trying to read up and figure this stuff out on my own, lol. I only come to you guys when the frustration is mounting up to much. :-)
Could someone plz tell me what I am suppose to do to make my players actor destroy another actor when the mouse key is pressed.
I'm working on a game where I have one actor randomly pop up on the screen, yet it will require a touch, button, or click to make the actor being player controlled react and destroy the pop up.
I understand how to set everything up for the movement, touch, click, etc... yet I don't understand how to make it contact and destroy the game actors. Can some one plz help me with this? Thank you again.
Sorry I'm having to come back to the forums so much, I'm honestly trying to read up and figure this stuff out on my own, lol. I only come to you guys when the frustration is mounting up to much. :-)
Could someone plz tell me what I am suppose to do to make my players actor destroy another actor when the mouse key is pressed.
I'm working on a game where I have one actor randomly pop up on the screen, yet it will require a touch, button, or click to make the actor being player controlled react and destroy the pop up.
I understand how to set everything up for the movement, touch, click, etc... yet I don't understand how to make it contact and destroy the game actors. Can some one plz help me with this? Thank you again.
Comments
If you want the enemy to die when the player presses the mouse button *anywhere*, have a rule within the enemy that states:
When mouse button is down
Destroy
If you want to destroy the enemy when you touch it, then have a rule within the enemy that says:
When touch is pressed
Destroy
If it's with a button click outside of the enemy that destroys the enemy, then make a boolean variable called 'enemyDie' and set to false.
within the button you press to kill the enemy have a rule that says:
If touch is pressed then
(timer) for .5
make 'enemyDie' = true
(time)after .5 seconds
Make 'enemyDie'=False
on your enemy actor have the rule:
If attribute enemyDie - true
Destroy this actor
I think that covers it, but I'm not sure it's what you're after. Hope that helps.
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io