Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Hi, Any ideas on how to make a white flash effect appear when an enemy gets hit by the player's bullets? Right now I use an enemy AI-script, and I've made the texture changes to a white texture as an action on "ActionOnHit" in the enemy script. And I've put another script on the enemy which is "Every few seconds do something" and then made it so the texture on the enemy is changed back to the original texture, and not the white texture)... It's a complete mess, and I wonder if there's any better idea, or a script? Thanks in advance my friends! |
||||
|
Why dont you use particles and add some bloodsplatters? If you are online this evening i can send you a prefab. |
||||
|
you are on the correct path with the effect action on hit change texture to white do later 300ms change texture to normal texture that is how i would do it |
||||
|
To make it even simpler, have a white 2d overlay with behaviour "every 100 ms:" toggle visibility of "current node" (ie: the 2d overlay), then click the checkbox on the node to make it invisible to start with. Then "When player hit, do action:" "make 2d overlay visible" - it wil show white when hit and will automatically make itself invisible after 100 ms. |
||||
|
|