Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: Fat Pug Studio on March 21, 2016, 10:26:40 AM
-
Hello,
i would really like some help. I am making a side scrolling shooter, and i need to make enemy sprites flash when hit (player bullet box collider 2d coliding with enemy box collider 2d). I tried with set color, but that doesn't work.
Any ideas for the FSM?
-
Actually,
i made it, you can find the solution on the page i opened for sharing FSM's.
http://hutonggames.com/playmakerforum/index.php?topic=12301.msg57312#msg57312
Unfortunately, i can't figure out how to flash in WHITE color, it would be nice if someone would have an idea.
-
Hi,
you could use "swap sprite" and swap with none
If you get a white box you can me a blanco sprite and use that.
There are a few different ways that you can do this.
a way you can use is use "action sequence" (right click in the state screen and select it)
then do "swap sprite / wait / swap sprite / wait / swap sprite / wait / swap sprite / wait"
another way is by using the animator.
-
Hi,
a way you could to this is to use a white sprite in front of the original sprite and change the alpha from the white sprite.
-
Well,
it's not quite the solution to make double sprites (normal and white) for every enemy object in the game. Anyway, i'll try that out too.
And about the second post, i don't quite understand you, how can i use white sprite in front of the original sprite?
-
And about the second post, i don't quite understand you, how can i use white sprite in front of the original sprite?
Now i know what you mean :)
It's been a few months, and i made a lot of progress, but there's the same wall i'm hitting again. I have an FSM with set property/color of the sprite render to red. The transition from state two to state three goes smoothly, but the color doesn't change. Object is Kinematic with discreete collision detection, it uses circle collider 2D. Other than that everything else is usual. It is on the same layer as the bullet that collides it.
Here's a screenshot of the FSM.
(https://s15.postimg.org/td6lh1czv/image.jpg)
-
Hi,
I tried here, color seems to work but you can try materials/color
What version of unity and playmaker are you using?
Also you do not need to set every frame :)
-
Well guess what, i deleted the FSM and made a new one, now it works. Thanks!
-
Hi,
What version of unity and playmaker are you using?
-
Hello djaydino,
i solved the problem, i think it was wrong because i imported the template that was no longer working, and made an FSM in it. When created in fresh FSM, it worked. Unity 5.3.5f1, Playmaker 1.8.1.f10.