blood
blood
anyone know how to make blood effect like this one. if you do, help me!
- Attachments
-
- images.jpeg (7.42 KiB) Viewed 3393 times
Re: blood
anyone? i want to have the blood spill on the wall when the pawn is shot. Is it possible?
Re: blood
Can you be more specific? I meant what kind of coding do I need to do?
Re: blood
well you have to get the pawn actor and a blood effect into it useing milkshape or equity or any other program that allows you too. Then you have to make a new script for the actor useing the motions such as walk or die. after you do that make the blood code heres such as. the motion you have to have is should be called blood after you have that insert a code like this. it might not work though cause I didnt work hard on it.
blood[()
{
AnimateBlood("die",0,""); //Blood Animation
FadeOut(5,0); //Fade out actor
Remove(true); //remove pawn after death
}]
blood[()
{
AnimateBlood("die",0,""); //Blood Animation
FadeOut(5,0); //Fade out actor
Remove(true); //remove pawn after death
}]
- QuestOfDreams
- Site Admin
- Posts: 1520
- Joined: Sun Jul 03, 2005 11:12 pm
- Location: Austria
- Contact:
Re: blood
Seriously, how would you do this with an actor animation? To me this seems impracticable.
What you can do is to use a spray effect to simulate blood spouting out of the body.
For this you need a spray effect definition in the effect.ini file, an explosion definition in the explosion.ini file (using that effect) and the AddExplosion script method in the appropriate scipt order of your pawn.
in effect.ini add something like
in explosion.ini add
in the pawn script add to your Hit or Die order
To get the blood stick on the wall is bit more tricky. The only way to get a bitmap onto a wall is by using decals and those on the other hand require a projectile to hit the wall.
Hence, what we have to do is add a DecalDefine entity to the level, a projectile definition to the weapon.ini file and the FireProjectile script method to the pawn's script.
DecalDefine like:
a projectile definition like
in the pawn script add to your Hit or Die order
(You may have to play around with the arguments of SetTargetPoint)
What you can do is to use a spray effect to simulate blood spouting out of the body.
For this you need a spray effect definition in the effect.ini file, an explosion definition in the explosion.ini file (using that effect) and the AddExplosion script method in the appropriate scipt order of your pawn.
in effect.ini add something like
Code: Select all
[BloodSpray]
type = spray
bitmapname = blood.bmp
alphamapname = a_blood.bmp
angles = 0 0 0
colormax = 0 255 0
colormaxalpha = 255
colormin = 0 255 0
colorminalpha = 255
sourcevariance = 8
destvariance = 32
gravity = 0 0 0
maxscale = 0.25
minscale = 0.15
maxspeed = 100
minspeed = 50
maxunitlife = 0.5
minunitlife = 0.25
particlecreationrate = 0.01
totallife = 0.5
bounce = false
Code: Select all
[BloodSpray]
effect0 = BloodSpray
delay0 = 0
offset0 = 0 0 0
Code: Select all
GB=GetLastBoneHit();
AddExplosion("BloodSpray", GB, 0, 0, 0);
To get the blood stick on the wall is bit more tricky. The only way to get a bitmap onto a wall is by using decals and those on the other hand require a projectile to hit the wall.
Hence, what we have to do is add a DecalDefine entity to the level, a projectile definition to the weapon.ini file and the FireProjectile script method to the pawn's script.
DecalDefine like:
Code: Select all
Alpha 255
AlphaName a_blooddecal.bmp
BmpName blooddecal.bmp
Color 255 0 0
Height 32
Width 32
LifeTime 30
Type 0
Code: Select all
[blooddrop]
type = projectile
actor = proj.act
rotation = 0 0 0
scale = 1
gravity = false
bounce = false
speed = 300
lifetime = 1
boundingbox = 0.1
attachactor = false
bonelevel = false
damage = 0
altdamage = 0
explosionradius = 0
explosiondamage = 0
decal = 0
Code: Select all
SetTargetPoint(2*self.current_X - self.player_X, 2*self.current_Y - self.player_Y, 2*self.current_Z - self.player_Z, false);
FireProjectile("blooddrop", GB, 0, 0, 0, "none", 0);
Re: blood
Code: Select all
AddExplosion("Bullet_ActorExplosion", "Bip01", OFFSETX, OFFSETY, OFFSETZ, DAMAGEATTRIBUTE);
SetHoldAtEnd(false);
SetTarget(self.current_X, self.current_Y, self.current_Z);
FireProjectile(PROJECTILE1, "Bip01", 0, 0, 0, "none", 0);
self.ThinkTime = 0.05;
self.think = "monster_run_pain";
- QuestOfDreams
- Site Admin
- Posts: 1520
- Joined: Sun Jul 03, 2005 11:12 pm
- Location: Austria
- Contact:
Re: blood
When it comes to scripting, you have to be exact.
The AddExplosion method only takes 5 parameters.
You have to use the SetTargetPoint method not SetTarget.
SetTargetPoint(0, -200, 0);
or
SetTargetPoint(self.current_X, self.current_Y - 200, self.current_Z, false);
The AddExplosion method only takes 5 parameters.
You have to use the SetTargetPoint method not SetTarget.
SetTargetPoint(0, -200, 0);
or
SetTargetPoint(self.current_X, self.current_Y - 200, self.current_Z, false);
Re: blood
thanks QoD, it works