GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Actor DMG Flash / Overlap-Collide

Hey guys! I have a two part question:

First: I have an actor set to take dmg when it overlaps or collides with an enemy. I also changed it's self.color.blue to 0, and self.color.green to 0 making my actor turn red when overlapping or colliding. It then returns to normal when not overlapping or colliding. I would like to make it flash quickly between red and normal instead of staying constantly red when overlapping or colliding. How can I do this? I've been playing with a timer, but I can't figure out what goes where.

Second: My actor stops taking dmg if I stay overlapped or collided with the enemy actor. I'd like my actor to take dmg every 1 second it overlaps or collides, and if possible I'd like that dmg to line up with the red flash previously stated.

Any help would be great. Thanks!

~Dessek

Best Answers

Answers

  • SocksSocks London, UK.Posts: 12,822Member

    @Dessek said:
    Hey guys! I have a two part question:

    First: I have an actor set to take dmg when it overlaps or collides with an enemy. I also changed it's self.color.blue to 0, and self.color.green to 0 making my actor turn red when overlapping or colliding. It then returns to normal when not overlapping or colliding. I would like to make it flash quickly between red and normal instead of staying constantly red when overlapping or colliding. How can I do this? I've been playing with a timer, but I can't figure out what goes where.

    Second: My actor stops taking dmg if I stay overlapped or collided with the enemy actor. I'd like my actor to take dmg every 1 second it overlaps or collides, and if possible I'd like that dmg to line up with the red flash previously stated.

    Any help would be great. Thanks!

    ~Dessek

    For the colour just have a timer that returns blue and green to a value of 1 after X seconds . . . so for example:

    Timer - after 0.02 seconds
    Change attribute self.color.blue to 1
    Change attribute self.color.green to 1

    . . . . . . . . .

    I don't know what 'take dmg' means ?

  • DessekDessek Posts: 14Member

    Thanks guys! It means "take damage" Socks. I'll give it a shot and see what happens.

  • SocksSocks London, UK.Posts: 12,822Member

    @Dessek said:
    It means "take damage" Socks.

    Ah ! I see, a bit slow today.

Sign In or Register to comment.