Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: sapigwetao on July 06, 2020, 11:35:16 AM
-
Hello, i wanted to make my enemy or player flashing when get hit.
I tried to use Set Sprite Color from ecosystem, and its not change anything when the player bullet colliding the enemy.
Anywone know this solution?
Thank you
-
Hi.
Probably you have a sprite animation.
If so you can use 'Set Material Property Block Color' (you can find it on the Ecosystem (https://hutonggames.fogbugz.com/default.asp?W1181))
Set Property Name to "_EmissionColor"
Also you might need to use 'Set Material Property Block Float' to manipulate the "_EmissionPower"
-
First set it by hand to see if it even works. Sprite color only applies a tint where white is just the original colour. I had to make my own shaders to get an overlay color to make it flashing white.
-
Hi.
Probably you have a sprite animation.
If so you can use 'Set Material Property Block Color' (you can find it on the Ecosystem (https://hutonggames.fogbugz.com/default.asp?W1181))
Set Property Name to "_EmissionColor"
Also you might need to use 'Set Material Property Block Float' to manipulate the "_EmissionPower"
is it done like this?
because its take no effect form me too
Anyway this fsm i set when the Player bullet is hitting the enemy
-
Hi.
Here is a setup i use in our game :
(https://i.imgur.com/lE5Joif.png)
(https://i.imgur.com/Z5DeqDC.png)
(https://i.imgur.com/klapPMy.png)
If 'Use Owner' Is set then the fsm has to be on the object with the sprite renderer component.
Increasing the Emission Power will make it more clear. you can test on the material on a object manually.
(https://i.imgur.com/WXwNyso.png)
(https://i.imgur.com/BweMMe0.png)
-
Hi.
Here is a setup i use in our game :
(https://i.imgur.com/lE5Joif.png)
(https://i.imgur.com/Z5DeqDC.png)
(https://i.imgur.com/klapPMy.png)
If 'Use Owner' Is set then the fsm has to be on the object with the sprite renderer component.
Increasing the Emission Power will make it more clear. you can test on the material on a object manually.
(https://i.imgur.com/WXwNyso.png)
(https://i.imgur.com/BweMMe0.png)
Thanks, i will try it later, and i will followuping you if this was work or not. Thanks dude!
-
Hi.
Here is a setup i use in our game :
(https://i.imgur.com/lE5Joif.png)
(https://i.imgur.com/Z5DeqDC.png)
(https://i.imgur.com/klapPMy.png)
If 'Use Owner' Is set then the fsm has to be on the object with the sprite renderer component.
Increasing the Emission Power will make it more clear. you can test on the material on a object manually.
(https://i.imgur.com/WXwNyso.png)
(https://i.imgur.com/BweMMe0.png)
Hey im just realized why i cant change the color, even i try your tips.
Here is it.
first im not using spritesheet for my character and enemies.
i splitting each body and combined it into one Game Object called "Player", and i animated it using unity Animation.
also my Game Obj called "Player" has no sprite renderer, mash renderer etc.
and i think thats why i cant turn Player or enemies into flashing red when i hit the enemy. Each body of my sprites has it own sprite renderer.
and yet i still cant solved it.
-
Hi.
Then you should try to set the sprite color for each body part.
Or if each body part has the same material (but material should not be shared with something else).
Then you should try Set Material Color instead of Set Material Property Color.
And drag in the material to change color on.