Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (NnamueN, 1 invisible), 1,489 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
LucasJoshua, Baklazhan, Hanky27, firatv, wandaluciaia
19054 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
can i make a 3second burning effect?? #360717
02/26/11 13:35
02/26/11 13:35
Joined: Dec 2010
Posts: 13
T
tasha19 Offline OP
Newbie
tasha19  Offline OP
Newbie
T

Joined: Dec 2010
Posts: 13
i have this burning effect, the defeated player gets burned. but the burning effect won't stop, is there any way i can only make it like 3seconds burning effect?without having to ent_remove it? thank you!

Re: can i make a 3second burning effect?? [Re: tasha19] #360718
02/26/11 13:43
02/26/11 13:43
Joined: Apr 2008
Posts: 650
Sajeth Offline
User
Sajeth  Offline
User

Joined: Apr 2008
Posts: 650
yeah there are plenty ways to do so


Teleschrott-Fan.
Re: can i make a 3second burning effect?? [Re: Sajeth] #360719
02/26/11 14:00
02/26/11 14:00
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Post your code, tasha19.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: can i make a 3second burning effect?? [Re: Superku] #360746
02/26/11 18:15
02/26/11 18:15
Joined: Dec 2010
Posts: 13
T
tasha19 Offline OP
Newbie
tasha19  Offline OP
Newbie
T

Joined: Dec 2010
Posts: 13
/////////////////BURN
//
function Base_Effect_base_event(PARTICLE* p) {
p.vel_x = p.skill_x*p.skill_d/50;
p.vel_y = p.skill_y*p.skill_d/50;
p.vel_z = p.skill_z*p.skill_d/50;
p.skill_d = (p.skill_d + time_step*(var)1.000)%100;
}

function Base_Effect_base(PARTICLE* p) {
p.size = 2;
p.alpha = 100.000;
p.red = 128;
p.green = 128;
p.blue = 128;
p.skill_c = 0.5;
p.vel_x = random(2.000)+(-1.000);
p.vel_y = random(2.000)+(-1.000);
p.vel_z = (3.000);
p.lifespan = 10;
p.gravity = 0.000;
p.bmap = fire3_map;
p.flags = BRIGHT | TRANSLUCENT | MOVE;
p.skill_x = p.vel_x;
p.skill_y = p.vel_y;
p.skill_z = p.vel_z;
p.event = Base_Effect_base_event;
}

/////////////////////////////////emitter actions/////////////////////////////////

action Base_Effect_emitter() {
var eff_frac; eff_frac = 0;
wait(1);
while(my) {
parted_temp_vec.x = 0.000;
parted_temp_vec.y = 0.000;
parted_temp_vec.z = 0.000;
vec_add(parted_temp_vec,my.x);
eff_frac += 0.100*time_step*0.001;
if(eff_frac >= 1){
effect(Base_Effect_base,integer(eff_frac),parted_temp_vec,nullvector);
eff_frac -= integer(eff_frac);
}
wait(1);
}

}
/////////////////////////////////creation/////////////////////////////////

function fire_create(VECTOR* position) {
if(!position)position = nullvector;
wait(3);
you = ent_create(NULL,position,Base_Effect_emitter);
if(you) {
vec_add(you.x,vector(-128.786,-19.160,0.000));
vec_set(you.pan,vector(0.000,0.000,0.000));
vec_set(you.scale_x,vector(1.000,1.000,1.000));
set(you,PASSABLE);
set(you,INVISIBLE);
}
}

/////////////////////////////////////////////////
function PUTOUTOFNOWHERE(ENTITY* oonwPIECE){ //put the piece out of no where once eliminated

Base_Effect_emitter();//this is the action of the burning effect
wait(1);
//i want to stop the burning effect just right here
oonwPIECE.z = 10;
oonwPIECE.flags |= TRANSLUCENT;
oonwPIECE.alpha = 0;
oonwPIECE = NULL;

wait(1);

}

Re: can i make a 3second burning effect?? [Re: tasha19] #360747
02/26/11 18:21
02/26/11 18:21
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
Code:
function fire_create(VECTOR* position)
{
   if(!position)position = nullvector;
   wait(3);
   you = ent_create(NULL,position,Base_Effect_emitter);
   if(you)
   {
      vec_add(you.x,vector(-128.786,-19.160,0.000));
      vec_set(you.pan,vector(0.000,0.000,0.000));
      vec_set(you.scale_x,vector(1.000,1.000,1.000));
      set(you,PASSABLE);
      set(you,INVISIBLE);
   }
   wait(-3);     // wait 3 seconds
   ptr_remove(me); // ...and remove the emitter
}




Last edited by Widi; 02/26/11 18:22.

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

Gamestudio download | chip programmers | 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