Putting blood on agents

Users who are viewing this thread

Pio

Regular
When a character gets hit some blood appears on their body in the place where they were hit. In multiplayer all players can see that blood. How is it done? Can it be done with a script in the module system? Is it client side or server side?
 
Its a particle.

(particle_system_burst, "psys_game_blood_2", pos0, 125), #BLODDYBLOODBLOODDDDDD
 
jacobhinds said:
(there might be a WSE option for it)
Nope...
However, you can recreate a similar effect by using modified shaders.

Track the hit positions frame by frame and pass them to the shader file... then apply the vertex coloring.

Sounds simple, but requires a good amount of coding.
 
CutContent said:
Using the particle effect directly from MS actually does bloody the agents, but it bloodies their feet.

That's interesting. Maybe it depends on where particles are spawned?
 
Pio said:
CutContent said:
Using the particle effect directly from MS actually does bloody the agents, but it bloodies their feet.

That's interesting. Maybe it depends on where particles are spawned?

yeah it spawns on the floor if you forgot to adjust for the agent bones  :mrgreen:

just grab the target position by a specific bone like the head

Code:
(agent_get_bone_position, pos2, ":inflicted_agent_id", hb_head, 1),
(particle_system_burst, "psys_decap_blood", pos2, 5),
 
Are you sure it works? I just tested it in NW server side with even more particles and it didn't leave any blood on any agent. Maybe it's different in native? I used every blood effect there is:
Code:
(particle_system_burst, "psys_game_blood", pos2, 500),
(particle_system_burst, "psys_game_blood_2", pos2, 500),
(particle_system_burst, "psys_cannon_blood", pos2, 500),
(particle_system_burst, "psys_cannon_blood_2", pos2, 500),
(particle_system_burst, "psys_bird_blood", pos2, 500),

n3KRgLN.jpg
pKV6hx8.jpg


Agents have blood on them only after they got hit.
 
I noticed that another way to put blood on agents is using
Code:
agent_deliver_damage_to_agent
but I'm pretty sure this will put blood only on their feet (like when you slay somone in NW). Every time you attack another agent with a weapon information which bone was hit is stored. Is there any way to deliver damage to agent via script and choose which bone deliver it to?
 
Pio said:
I had to test it somehow :grin:

that is what happens when a soldier eats a grenade, thinking it was a apple, right?

I was not talking about MP in special if you read my quote. I don't test MP code, so I won't comment if it should work on that setting or not.

But your code below doesn't mean much in any case (SP or MP), as we have no idea where you got the pos2 from, and the code for your particle, etc. Also note your are overdoing the effect (500 value)  :mrgreen:

Pio said:
Code:
(particle_system_burst, "psys_game_blood", pos2, 500),
(particle_system_burst, "psys_game_blood_2", pos2, 500),
(particle_system_burst, "psys_cannon_blood", pos2, 500),
(particle_system_burst, "psys_cannon_blood_2", pos2, 500),
(particle_system_burst, "psys_bird_blood", pos2, 500),
 
kalarhan said:
But your code below doesn't mean much in any case (SP or MP), as we have no idea where you got the pos2 from, and the code for your particle, etc.

This is the code:
in on_agent_spawn script and also when admin spawns a shotgun which together with some hotkeys makes a cool looking effect :smile:
Code:
# pio's blood test
(try_for_agents, ":cur_bloody_agent"),
  (agent_get_bone_position, pos2, ":cur_bloody_agent", 9, 1),  # 9 is head bone
  (particle_system_burst, "psys_game_blood", pos2, 500),
  (particle_system_burst, "psys_game_blood_2", pos2, 500),
  (particle_system_burst, "psys_cannon_blood", pos2, 500),
  (particle_system_burst, "psys_cannon_blood_2", pos2, 500),
  (particle_system_burst, "psys_bird_blood", pos2, 500),
(try_end),


kalarhan said:
Also note your are overdoing the effect (500 value)  :mrgreen:

I tried using smaller values, but it didn't change anything.



edit
more screenshots for you guys:
9rdUmvG.jpg
VTZeeWb.jpg
jw23IQW.jpg
 
Damn, have mercy and stop medical experiments on these ppl. Thats horryfing.  :grin:

I have pretty stupid idea that may work (and certainly make lives of your testing subjects even worse).  In native you have "add_missile" command which shots choosen projectile from and to specifed positions. You could get position of bone, properly aim "add_missile" and shoot your agent adding bloody wound in result.  I guess you want just add blood without actually losing hp. This can be achiewed by overrriding damage done in some "on_agent_hit" trigger to zero.


Hmmm, Kalarhan didnt mentioned Q&A Thread. Something fishy. What you did to real Kalarhan?!
 
EmielRegis said:
Hmmm, Kalarhan didnt mentioned Q&A Thread. Something fishy. What you did to real Kalarhan?!

kids.... and unicorns...

you should re-read the posts if you can't see it too  :razz:, it is always there. We may make it more obvious for a new poster, which @Pio is not.

and this is turning into a experiment for a feature, which is not the same as a quick question, now is it?  :mrgreen:



Pio said:
This is the code:
in on_agent_spawn script and also when admin spawns a shotgun which together with some hotkeys makes a cool looking effect :smile:

I see this quote, but I can't really understand it. What do you want to do? What is wrong with the pictures? I really can't tell anymore, after all this mad scientist testing and exploding bodies (that look like you got the special perk in Fallour 4 for exploding bodies)

The thread started with a simple question: how to add a bleeding effect on MP. You never made it clear if it was suppose to be a one time thingy (last a second), if it is was suppose to be a continuous thingy (keep losing blood), if it was not bleeding at all, but instead to add blood to the cloths (texture), etc.

Also if you are still unsure about the MP part (how the server should tell the client to execute the event) you should check the OSP for choping kit, as that has MP code and bleeding effects
https://forums.taleworlds.com/index.php/topic,312168.msg7399411.html#msg7399411
 
EmielRegis said:
You could get position of bone, properly aim "add_missile" and shoot your agent adding bloody wound in result.  I guess you want just add blood without actually losing hp. This can be achiewed by overrriding damage done in some "on_agent_hit" trigger to zero.
No damage will result in no vertex coloring.
The damage value itself determines the strength of the blood effects.
 
_Sebastian_ said:
The damage value itself determines the strength of the blood effects.

Good to know.  In this case you could use "on_agent_hit" trigger to check how much damage was done and  heal it instantly.
 
EmielRegis said:
_Sebastian_ said:
The damage value itself determines the strength of the blood effects.

Good to know.  In this case you could use "on_agent_hit" trigger to check how much damage was done and  heal it instantly.

I wish there was a simpler way, but this will work too! Thanks for all the help.

kalarhan said:
and this is turning into a experiment for a feature, which is not the same as a quick question, now is it?  :mrgreen:

It's very cool that people are so interested in my little (evil) experiments :grin: and experimenting is probably the most fun part of modding! I was planning to use this on my NW zombie server to either make a special kind of zombie that would be covered in blood or maybe just let players (or donators) use this effect on their characters if they want to. If you would like to see one of my other experiments: some time ago I started experimenting with airplanes and now it's slowly turning into a public server.

kalarhan said:
What do you want to do? What is wrong with the pictures? I really can't tell anymore, after all this mad scientist testing and exploding bodies (that look like you got the special perk in Fallour 4 for exploding bodies)

Haha :grin:! The purpouse was to put blood on agent's body and clothes that other players could see. Just like you slash someone with a sword and then they have some blood on them. This is exactly what I wanted, but doing it with a script instead of having to hit someone. Ramaraunt and CutContent suggested to use blood particle effect and that it would cover the agent in blood, so that's why I did this test, but it didn't work in NW server side.
 
Another thing.  You could use "agent_set_no_death_knock_down_only" command which makes your agent immortal but all  damage dealt to him is normally seen as wound. I dont know, maybe set immortality, apply projectile, then turn it off? Mind that losing all hp results in short knockdown of agent.
 
It's not a bad idea, but I would still need to store the original amount of agent's health. I guess the best way to do this would be firing a missle in their face or any other bone each time they spawn. If I wanted to cover them all in blood it would have to be done almost for each bone and it seems that there is 19 of them. If they are immortal they will get knocked down each time they spawn, which may look funny, but I'm not sure I want that. The only way to avoid knocking them down is healing them instantly instead of making them immortal, but then I would have to make sure the amount of damage that missile does is not enough to kill them.

Why does it have to be so difficult?
 
Back
Top Bottom