ambiera logo

Ambiera Forum

Discussions, Help and Support.

folder icon Ambiera Forum > CopperCube > Help with CopperCube
forum topic indicator White flash effect when hit?
person icon
denko
Registered User
Quote
2024-06-09 17:11:30

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!

person icon
shadynl
Registered User
Quote
2024-06-09 18:01:36

Why dont you use particles and add some bloodsplatters? If you are online this evening i can send you a prefab.

person icon
o139
Registered User
Quote
2024-06-09 18:37:10

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

person icon
vp
Guest
Quote
2024-06-10 09:57:29

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.


Create reply:










 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


icon_holyicon_cryicon_devilicon_lookicon_grinicon_kissicon_monkeyicon_hmpf
icon_sadicon_happyicon_smileicon_uhicon_blink   






Copyright© Ambiera e.U. all rights reserved.
Contact | Imprint | Products | Privacy Policy | Terms and Conditions |