Gamestudio Links
Zorro Links
Newest Posts
Purchase A8 full licence version
by ukgamer. 04/29/26 18:09
Z9 getting Error 058
by k_ivan. 04/25/26 19:13
ZorroGPT
by TipmyPip. 04/25/26 16:09
Stooq now requires an API key
by jcl. 04/13/26 09:42
Strange "Alien" Skull created with >Knubber<
by NeoDumont. 04/10/26 18:58
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (Quad, clonman), 6,433 guests, and 63 spiders.
Key: Admin, Global Mod, Mod
Newest Members
ukgamer, valino, juergenwue, VladMak, Geir
19210 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