Multiple actors walking into a wall, how to decrease wall hp while touching?
I know this doesn't sound right but right now when I have a monster walk into my wall, I want the walls hp to go down 1 every 1 second. I also have several monsters that I want this capability of.
My problem is that I'm using 'when wall overlaps/touches monster' then do such and such...However, this isn't a constant attribute like I thought it would be, so it will only happen just once, and will not trigger the timer.
(To test this, I changed the trigger to mouse down, and the timer would only be activated as long as I was touching the image)
So I thought about using a boolean that will trigger when it first touches, which makes sense, but the problem comes when the 2nd or the 3rd monster come here too. So the boolean can't be used.
Any ideas? Points for simplicity as always!
FYI all of the monsters are from the same actor, and there will be many more than just 3
My problem is that I'm using 'when wall overlaps/touches monster' then do such and such...However, this isn't a constant attribute like I thought it would be, so it will only happen just once, and will not trigger the timer.
(To test this, I changed the trigger to mouse down, and the timer would only be activated as long as I was touching the image)
So I thought about using a boolean that will trigger when it first touches, which makes sense, but the problem comes when the 2nd or the 3rd monster come here too. So the boolean can't be used.
Any ideas? Points for simplicity as always!
FYI all of the monsters are from the same actor, and there will be many more than just 3
Answers
I had an index on the monster actor that was 0 if walking and changed to 1 if it touched the wall. I put a timer in the monster that every 1 second it does HP (a global variable) -1.
This seems to work and sounds incredibly easy. My understanding of the actors being copied isn't up to speed I guess. Thanks for looking guys.