Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Mewdoom

How to make blood drip stay on floor ?

Recommended Posts

Hello guys,

I just try the blood skull of Realm 667, he is very nice. However, I would like the blood drip to stay on the floor, I have a sprite that represent puddles but I dont know how to change the script to let it stay on floor.

I know that can be a lot of memory usage if every drop stay on the floor after an hour, maybe there is a way to make it disapear after amount of time ?

here is the original script of the blood skull blood drip;

Actor SkullBloodDrip
{
Radius 1
Height 4
+MISSILE
+TOUCHY
+DONTSPLASH
Damage 0
Scale 0.4
Gravity 0.7
ReactionTime 2
States
{
Spawn:
BDR2 A 5 A_CountDown
Loop
Death:
TNT1 A 1
Stop
}
}

Share this post


Link to post

Found it ! If you want the solution..

just add a frame with your own sprite and put -1

like this:

Spawn:
BDR2 A 5 A_CountDown
BDR2 B -1 A_CountDown
Loop


But I dont know if the engine will support indifinetely a lot of that sprite that remain in the game ? let say if the monster never die and continue to drop and drop his blood ? :)

Share this post


Link to post

Instead of doing that and making the drips permanent, you could just increase the value of ReactionTime and make them last for a longer while. The original code calls A_CountDown every five tics, meaning it calls it 7 times per second (there are 35 tics in a second), so if you want the drips to last, say, two full minutes, you'd use ReactionTime 840. (7 calls per second, 60 seconds per minute, for two minutes: 7*60*2=840)

Share this post


Link to post

That a nice idea :)

But I have trouble to do it, the drip is still in loop for 2 min instead of just the puddle. How can I let the drip fall but just keep the puddle for 2 min ?

Share this post


Link to post

What about making a tiny circular/oval sector using the BLOOD1 flat for the pool effect?

Share this post


Link to post

Here, try replacing the 'SkullBloodDrip' actor with this:

Actor SkullBloodDrip
{
Radius 1
Height 4
+MISSILE
+NOTELEPORT
+TOUCHY
+DONTSPLASH
Scale 0.4
Gravity 0.7
States
{
Spawn:
	BDR2 A 5
	Loop

Death:
	POB2 A 2100
        Stop
}
}
The blood puddle will last for a minute before it disappears.

Share this post


Link to post

Thanks for your help :)

I have a little bug with it, the drip is stick on the floor when the skull is moving on low height, its like the "Touchy" flag doesnt make his job, the script is finising the loop and then, enter in the death state.

Share this post


Link to post

That's because the blood drip doesn't fall long enough to gain enough speed that would hurt it and make it die upon impact. Try giving the blood drip some positive (or maybe negative) VSpeed. If that fails, just make the Spawn animation go into the Death state after a brief time instead of looping infinitely in the Spawn state.

Share this post


Link to post

I found a workaround, vspeed doesnt seem to work with negative or positive value.

With the reactiontime set to 10 if I set the tics to 0, it work.
BDR2 A 0 A_CountDown

however, that just fix when the skull is near the floor, that bring another bug when he is high in the sky the puddle is shown before hitting the floor now ..

Share this post


Link to post

Of course, because setting the delay to 0 will effectively make the countdown finish instantly, and the actor will enter Death state seemingly immediately after being spawned.

Share this post


Link to post

There must be a way to make it properly. the goal is to not let the drip of the floor when is low height or height and make the puddle show for couple min once the drip hit the floor...

Share this post


Link to post

Use Rayzik's blood drip definition + edit the BloodSkull itself so that it will spawn the blood drips higher above its bottom point (for example 8 units above it). In other words, replace all instances of this function in the BloodSkull's states:

TNT1 A 0 A_SpawnItemEx("SkullBloodDrip",random(-2,2),random(-2,2),0,0,0,0,0,0)
With this one:
TNT1 A 0 A_SpawnItemEx("SkullBloodDrip",random(-2,2),random(-2,2),8,0,0,0,0,0)
So that the entire DECORATE file should look like this:
Spoiler

Actor BloodSkull
{
Health 150
Radius 16
Height 56
Mass 9999
Speed 8
PainChance 50
Monster
+FLOAT
+NOGRAVITY
+DONTFALL
+NEVERRESPAWN
SeeSound "BSkull/See"
PainSound "BSkull/Pain"
DeathSound "BSkull/Death"
ActiveSound "Skull/Active"
Obituary "%o got spitted by a blood skull."
States
{
Spawn:
	SWBS AA 4 A_Look
	TNT1 A 0 A_SpawnItemEx("SkullBloodDrip",random(-2,2),random(-2,2),8,0,0,0,0,0)
	Loop
See:
	SWBS AA 4 A_Chase
	TNT1 A 0 A_SpawnItemEx("SkullBloodDrip",random(0,4),random(-2,2),8,0,0,0,0,0)
	Loop
Missile:
	SWBS A 2 A_FaceTarget
	SWBS B 2 A_CustomMissile("BloodSpit",12,0,0,0,0)
	SWBS BA 2
	TNT1 A 0 A_SpawnItemEx("SkullBloodDrip",random(-2,2),random(-2,2),8,0,0,0,0,0)
	Goto See
Pain:
	SWBS A 2 A_Pain
	Goto See
Death:
	SWBS C 6 A_NoBlocking
	SWBS D 5 Bright A_Scream
	TNT1 A 0 A_SetTranslucent(0.8,0)
	SWBS EFGH 5 Bright
	Stop
}
}

Actor SkullBloodDrip
{
Radius 1
Height 4
+MISSILE
+NOTELEPORT
+TOUCHY
+DONTSPLASH
Scale 0.4
Gravity 0.7
States
{
Spawn:
	BDR2 A 5
	Loop

Death:
	POB2 A 2100
        Stop
}
}


Actor BloodSpit
{
Radius 6
Height 6
Speed 17
Damage 3
Scale 0.5
SeeSound "Blood/Spit"
DeathSound "Blood/Impact"
PROJECTILE
Decal BloodSplat
States
{
Spawn:
	BSHT AB 2 A_CustomMissile("BloodSpitTrail",0,0,180)
	Loop
Death:
	BSHT C 6 
	BSHT D 6 
	Stop
}
}

Actor BloodSpitTrail
{
Radius 1
Height 1
Speed 0
PROJECTILE
Renderstyle Translucent
Alpha 0.8
Scale 0.3
+NOCLIP
states
{
Spawn:
	BSHT CD 4 
	Stop
}
}

I've tested it and it seems to work.

Share this post


Link to post

Thanks a lot I will try it :)

I wonder how can I set the skull to make him adjust his height when attacking the player ? Because sometime he is too low or too high and we dont see him well ?

Share this post


Link to post

The skull already adjusts its height level to the player's one when approaching him - it's what the FLOAT flag does. Do you want the skull to absolutely never fire when the player doesn't see it, or what?

Share this post


Link to post

Ah ok, no its just the skull doest seem to be at the right height when attacking the line of sight is a bit to high I see the half of him when he is close.

Share this post


Link to post

That's all normal - Doom's standard floating monsters behave like that too. The height adjusting works the way that the monster's bottom point tries to match the height of the player's center point when up close. You could counter this by offsetting the monster's sprites themselves downwards and adjusting the height of the monster's spawned projectiles in parameters of A_CustomMissile, but then the monster would seemingly sink into the ground if it happened to be moving close to the ground.

Share this post


Link to post

I wonder if its possible to make blood puddle randomly instead of having a sprite defined ? like when we shoot monsters in Boom engine and the blood splash everywhere ?

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×