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
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, 1 invisible), 1,395 guests, and 12 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Particles crashing my game... #170320
11/30/07 19:17
11/30/07 19:17
Joined: Apr 2006
Posts: 36
P
pwy Offline OP
Newbie
pwy  Offline OP
Newbie
P

Joined: Apr 2006
Posts: 36
Hello,
I have Comm. v 7.

I'm not sure if I am doing something wrong, or if it is a bug.
Simply, if I make more than one "effect" my game crashes.

If I make one, everything runs great. But, if I make one more and run it,
...crash!

I've tried everything. Even setting "max_particles" to a really high number
doesn't fix the problem.


Has this happened to anyone before?


Thanks in advance for any help.

Re: Particles crashing my game... [Re: pwy] #170321
11/30/07 22:34
11/30/07 22:34
Joined: Apr 2006
Posts: 36
P
pwy Offline OP
Newbie
pwy  Offline OP
Newbie
P

Joined: Apr 2006
Posts: 36
OK. I've tried just about everything. I've read AUM41 on particles and such.
I've looked at the 3DGS Manual. Nothing is working. I even tested it on another machine to make sure. It has to be something small I am missing. It always is.

This is the code for my fire trail:

CODE----------------------------------------------------------
function fadeFireParticle(){
my.alpha -= 5 * time_frame;
if( my.alpha < 0 ){
my.lifespan = 0;
}
}//end function

function fireEffect(){
my.bmap = glow;
my.alpha = 30 - random(60);
my.size = 16 + random( 32 );
my.flare = on;
my.move = on;
my.bright = on;
my.function = fadeFireParticle;
}//end function


function fireBallTrail( position ){
effect( fireEffect , 1 , position , normal );
}//end function
CODE----------------------------------------------------------


This is the code for the particles when an enemy dies. I wanted to make a spirit like effect:

CODE----------------------------------------------------------
function fadeSpiritEffect(){
my.alpha -= 5 * time_frame;
if( my.alpha < 0 ){
my.lifespan = 0;
}
}//end function


function spiritEffect(){
my.bmap = "smoke.tga";
my.alpha = 30 - random(60);
my.size = 32 + random( 64 );
my.flare = on;
my.move = on;
my.bright = on;
my.function = fadeSpiritEffect;
}//end function


function summonSpirit( position ){
effect( spiritEffect , random(20)+10 , position , normal );
}//end function
CODE----------------------------------------------------------


This is how I called the particles:

...
summonSpirit( vector( my.x , my.y , my.z ) );
...

or

...
fireBallTrail( vector( my.x , my.y , my.z ) );
...


And both of those are in a "while( my )" loop.
Any ideas? I think I have been staring at this too long.
Thanks again in advance for any help!

Re: Particles crashing my game... [Re: pwy] #170322
11/30/07 22:42
11/30/07 22:42
Joined: Apr 2006
Posts: 36
P
pwy Offline OP
Newbie
pwy  Offline OP
Newbie
P

Joined: Apr 2006
Posts: 36
Um.

After posting that, I realized what I did wrong.
Heh, heh.

...
my.bmap = "smoke.tga";
...


Should have been a BMAP.
...
BMAP = "smoke.tga";
...

Then:
my.bmap = smoke;


Duh! Sorry.




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