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
1 registered members (TipmyPip), 18,631 guests, and 7 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
About Particle pointer #475302
12/01/18 13:26
12/01/18 13:26
Joined: Feb 2003
Posts: 146
RP China
2
20BN Offline OP
Member
20BN  Offline OP
Member
2

Joined: Feb 2003
Posts: 146
RP China
Hi, all.
How to set point PARTICLE* p in other function?

Re: About Particle pointer [Re: 20BN] #475304
12/01/18 13:58
12/01/18 13:58
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
For what purpose?


"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: About Particle pointer [Re: Superku] #475324
12/02/18 09:05
12/02/18 09:05
Joined: Feb 2003
Posts: 146
RP China
2
20BN Offline OP
Member
20BN  Offline OP
Member
2

Joined: Feb 2003
Posts: 146
RP China
Originally Posted By: Superku
For what purpose?


Hi, @Superku .
I want change p.bmap in other function.

Re: About Particle pointer [Re: 20BN] #475325
12/02/18 09:10
12/02/18 09:10
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
You *can* set a global particle pointer to some particle in its (event) function and use that when you manually set the pointer to NULL before particle removal (for example when lifespan gets low), but that's dangerous and can and probably will lead to crashes at some point.

I suggest you either use sprites/ models/ entities or if there's a bunch of those particles, then just use a global variable which the particle checks for:

Code:
var particleVariableBitmapType = 0;

void p_event(PARTICLE *p)
{
	if(particleVariableBitmapType == 1) p.bmap = smoke_bmp;
	else p.bmap = fire_bmp;
}

void p_fnc(PARTICLE *p)
{
	...
	p.event = p_event;
}

effect(p_fnc,...);



"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: About Particle pointer [Re: Superku] #475327
12/02/18 09:20
12/02/18 09:20
Joined: Feb 2003
Posts: 146
RP China
2
20BN Offline OP
Member
20BN  Offline OP
Member
2

Joined: Feb 2003
Posts: 146
RP China
@Superku
Thank you so much.
This is the best solution for me!


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