Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 17,416 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
how attach a blood particles to the AI #252422
02/18/09 07:43
02/18/09 07:43
Joined: Jan 2009
Posts: 33
Philippines, Quezon City
K
Kaizen_31 Offline OP
Newbie
Kaizen_31  Offline OP
Newbie
K

Joined: Jan 2009
Posts: 33
Philippines, Quezon City
ahmm.. please help me to attach the blood particles to my enemy..

i wanted that when ever my character hits the enemy by the bullet some blood will come out and i also wanted to when the enemy is dead there some blood that will show..

please help me thanks..

Re: how attach a blood particles to the AI [Re: Kaizen_31] #252427
02/18/09 08:04
02/18/09 08:04

M
mercuryus
Unregistered
mercuryus
Unregistered
M



You have three different techniques to realise for this:

1. blood particles when hit (particles)
2. bloody texture at hitpoints (decals)
3. bloodstain when died (sprite or decal)

what you want to start with?

Re: how attach a blood particles to the AI [Re: ] #252428
02/18/09 08:16
02/18/09 08:16
Joined: Jan 2009
Posts: 33
Philippines, Quezon City
K
Kaizen_31 Offline OP
Newbie
Kaizen_31  Offline OP
Newbie
K

Joined: Jan 2009
Posts: 33
Philippines, Quezon City
ahm..mercuryus the 1st, 2nd and the 3rd..

the first one,,thanks..

Re: how attach a blood particles to the AI [Re: Kaizen_31] #252435
02/18/09 09:05
02/18/09 09:05

M
mercuryus
Unregistered
mercuryus
Unregistered
M



Here is an example:
Code:
// eff_blood.c
BMAP* eff_bloodBmap 	= "blood.tga";

function eff_blood_spec_fun(PARTICLE* p) {
    p.alpha -= 6 *time_step;
    if(p.alpha < 0) { p.alpha = 0; p.lifespan = 0; }
}

function eff_bloodspezial(PARTICLE* p){
    p.blue = 70;
    p.green = 70;
    p.red = 90;
    p.bmap = eff_bloodBmap;  //the effect bitmap
    p.vel_x = random(2) - 1;
    p.vel_y = random(2) - 1;
    p.vel_z = random(4);
    p.size = 3+random(2);
    p.alpha = 30;
    p.gravity=1+random(.5);
    set(p, BRIGHT | MOVE | TRANSLUCENT);
    p.event = eff_blood_spec_fun;
}

function eff_blood(var* p_pos, var p_cnt){
	effect(eff_bloodspezial, p_cnt, p_pos[0], nullvector);
}


[edit]If you shoot at the enemy and he got hit you can use the target-vector to locate the position:

eff_blood(target.x, 10);

Last edited by mercuryus; 02/18/09 09:07.
Re: how attach a blood particles to the AI [Re: ] #252436
02/18/09 09:10
02/18/09 09:10
Joined: Jan 2009
Posts: 33
Philippines, Quezon City
K
Kaizen_31 Offline OP
Newbie
Kaizen_31  Offline OP
Newbie
K

Joined: Jan 2009
Posts: 33
Philippines, Quezon City
ahmm.. thanls for that code i will tru it later hmm..
how about the 2nd and the 3rd one? hmm..
thanks in advance..

Re: how attach a blood particles to the AI [Re: Kaizen_31] #252437
02/18/09 09:30
02/18/09 09:30

M
mercuryus
Unregistered
mercuryus
Unregistered
M



2. use deacls (see handbook) and if you got lost - ask again.
3. place a blood sprite on the floor where the enemy falls to ground. Scale it smooth from 0.1 to 1 (or what you need). This way you fake the bleeding effect

Re: how attach a blood particles to the AI [Re: ] #252438
02/18/09 09:38
02/18/09 09:38
Joined: Jan 2009
Posts: 33
Philippines, Quezon City
K
Kaizen_31 Offline OP
Newbie
Kaizen_31  Offline OP
Newbie
K

Joined: Jan 2009
Posts: 33
Philippines, Quezon City
where i can see or view the handbook that you've said?and how i can position the sprite in the model when it dead?

Re: how attach a blood particles to the AI [Re: Kaizen_31] #252445
02/18/09 10:28
02/18/09 10:28

M
mercuryus
Unregistered
mercuryus
Unregistered
M



Press F1 within SED to open the handbook/help
Then search for decal

You can place a sprite like this:

ent_create("blood.bmp", player.x, act_blood);
but of cause you have to adjust the position (x,y,z) and/or the angle (pan,tilt,roll).
Furtheron you have to script the scaling: scale_x, scale_y

Maybe you should start with the tutorials to get an idea of entites and their possibilities...


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1