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
4 registered members (NewbieZorro, Grant, TipmyPip, AndrewAMD), 13,346 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
trying to create some particles #251770
02/14/09 19:26
02/14/09 19:26
Joined: May 2008
Posts: 13
Greece
N
ngiannakas Offline OP
Newbie
ngiannakas  Offline OP
Newbie
N

Joined: May 2008
Posts: 13
Greece
trying to make some particles from the example in the help file, though I doing something really wrong because can't seem to be able to produce any kind of output
here is the code I am trying

Code:
#include <acknex.h>
#include <default.c>

BMAP* particle_bmap = "light_red.tga";
var sploder_center[3] = { 50.0, 0.0, 0.0 };
var null_vector[3] = { 0.0, 0.0, 0.0 };

function vec_randomize (VECTOR* vec, var range)
{
   vec_set(vec,vector(random(1)-0.5,random(1)-0.5,random(1)-0.5));
   vec_normalize(vec,random(range));
}

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

function effect_explo(PARTICLE *p)
{
   VECTOR vTemp;
   vec_randomize(vTemp,10);
   vec_add(p.vel_x,vTemp);
   p.alpha = 25 + random(25);
   p.bmap = particle_bmap;
   p.flags |= (BRIGHT | MOVE);
   p.event = part_alphafade; // change to a shorter, faster function
}

function main()
{
	while(1)
	{
		effect(effect_explo,1000, sploder_center, null_vector);
		wait(-1);
	}
}


can someone help me out with this please and enlighten me?

Re: trying to create some particles [Re: ngiannakas] #251782
02/14/09 20:22
02/14/09 20:22
Joined: May 2008
Posts: 13
Greece
N
ngiannakas Offline OP
Newbie
ngiannakas  Offline OP
Newbie
N

Joined: May 2008
Posts: 13
Greece
please forget this one, stupid me did not know I needed to load a level, all fixed now and thanks for helping


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