Gamestudio Links
Zorro Links
Newest Posts
MinMax function on History t6 file
by LucasJoshua. 11/21/26 14:28
What are you working on?
by rayp. 11/20/26 18:10
FXCM => AVA Trade Plugin???
by Martin_HH. 11/17/26 17:02
contractUpdate() is filtering if >2 rows
by mistery. 11/09/26 12:06
New Zorro version 3.15
by jcl. 11/09/26 09:24
Removing outliers from files
by jcl. 11/04/26 10:30
[MED] Import from FBX (2010) missing!!!
by rayp. 11/03/26 14:33
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (LucasJoshua, EW_bytes, 1 invisible), 33,977 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rht, MaliceTheMaker, Haitao_Ren, JimSimons, julienp
19249 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 | 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