Damage indication HELP

id like to make player and enemies flash red when damage occurs, WITHOUT using an animation. how can i do this ? ive tried messing with color blending and shaders but i cant get the formula right. pls help.

2 Likes

If you look in the code for the infected in D.O.M you should be able to find what you’re looking for. I’ll go ahead and grab a link for you

1 Like

appreciate it thank you

1 Like

If you search in the library “infected 1” you should be able to find the code you’re looking for

1 Like

this is very confusing , i cant find the code

2 Likes

I can’t help you right now, but maybe later I can show you.

1 Like

I went in and got the code for you:

{“data”:{“behavior”:{“v”:“2”,“nodes”:[{“inputCount”:1,“outputCount”:0,“name”:“flash”,“behaviorType”:“logic.NodeGroup”,“x”:900,“y”:640,“group”:“4853976fc2719c4f”,“id”:“48539776bfe2f74f”,“isMenuItem”:false},{“inputCount”:0,“outputCount”:1,“name”:“Bundle Input”,“behaviorType”:“logic.NodeGroupInput”,“x”:360,“y”:480,“group”:“48539776bfe2f74f”,“id”:“485397767448cc44”,“portId”:“48539776bfe2f74fi0”,“tag”:“hit”,“dataType”:2},{“inputCount”:3,“outputCount”:1,“name”:“Number”,“behaviorType”:“logic.logic.Value”,“x”:630,“y”:448,“group”:“48539776bfe2f74f”,“id”:“485397765e2b024c”,“startVal”:1000,“tag”:""},{“inputCount”:3,“outputCount”:1,“name”:“Number”,“behaviorType”:“logic.logic.Value”,“x”:900,“y”:448,“group”:“48539776bfe2f74f”,“id”:“485397763071ad42”,“startVal”:100,“tag”:""},{“inputCount”:4,“outputCount”:4,“name”:“Colors”,“behaviorType”:“logic.properties.Colors”,“x”:1170,“y”:448,“group”:“48539776bfe2f74f”,“id”:“4853977678a91047”},{“inputCount”:0,“outputCount”:1,“name”:“Always”,“behaviorType”:“logic.triggers.Always”,“x”:720,“y”:256,“group”:“48539776bfe2f74f”,“id”:“48539776be1b4843”},{“delay”:1,“count”:1,“inputCount”:3,“outputCount”:1,“name”:“Timer”,“behaviorType”:“logic.triggers.Timer”,“x”:630,“y”:736,“group”:“48539776bfe2f74f”,“id”:“4853977636a78247”},{“inputCount”:3,“outputCount”:1,“name”:“Number”,“behaviorType”:“logic.logic.Value”,“x”:810,“y”:768,“group”:“48539776bfe2f74f”,“id”:“48539776e8d3c148”,“startVal”:100,“tag”:""},{“inputCount”:3,“outputCount”:1,“name”:“Number”,“behaviorType”:“logic.logic.Value”,“x”:630,“y”:640,“group”:“48539776bfe2f74f”,“id”:“4853977648335e4a”,“startVal”:0,“tag”:null},{“inputCount”:3,“outputCount”:1,“name”:“Number”,“behaviorType”:“logic.logic.Value”,“x”:630,“y”:544,“group”:“48539776bfe2f74f”,“id”:“48539776f7666a43”,“startVal”:0,“tag”:null}],“links”:[{“input_id”:“485397765e2b024ci1”,“output_id”:“485397767448cc44o0”},{“input_id”:“48539776f7666a43i1”,“output_id”:“485397767448cc44o0”},{“input_id”:“4853977648335e4ai1”,“output_id”:“485397767448cc44o0”},{“input_id”:“485397763071ad42i0”,“output_id”:“485397765e2b024co0”},{“input_id”:“4853977636a78247i0”,“output_id”:“485397765e2b024co0”},{“input_id”:“4853977678a91047i0”,“output_id”:“485397763071ad42o0”},{“input_id”:“485397763071ad42i1”,“output_id”:“48539776be1b4843o0”},{“input_id”:“48539776e8d3c148i1”,“output_id”:“4853977636a78247o0”},{“input_id”:“485397763071ad42i0”,“output_id”:“48539776e8d3c148o0”},{“input_id”:“4853977678a91047i1”,“output_id”:“48539776e8d3c148o0”},{“input_id”:“4853977678a91047i2”,“output_id”:“48539776e8d3c148o0”},{“input_id”:“4853977678a91047i2”,“output_id”:“4853977648335e4ao0”},{“input_id”:“4853977678a91047i1”,“output_id”:“48539776f7666a43o0”}]}}}

1 Like

@Ramshackle thanks guys ill try it now

2 Likes

i pasted it and it didnt work , nothing showed. weird usually it would copy and paste just fine

2 Likes

I didn’t look at what John posted but you may want to ask @JR01 about this, it is possible that @Johnny_boy by mistake didn’t copy the whole section required.

2 Likes

This is very easy to do, all you need to do is put 100 into a Color behavior Red input, but you also need to put 0 into the Green and Blue inputs. Doing this should make your character red. Now hook it up to a timer to have red go to 100, blue go to 100, and green go to 100 so they go back to normal. (If the character doesn’t turn red change the Input to 200 and see if that helps).

3 Likes

You might have to click on the zoom out then zoom in (magnifying glass) in the behavior editor. They’re on the bottom left side of the screen.

1 Like

thanks it worked , just how i wanted :slight_smile:

4 Likes