Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (TedMar, AndrewAMD), 1,033 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
clip particles #307350
01/28/10 17:47
01/28/10 17:47
Joined: Mar 2007
Posts: 99
Germany
zSteam Offline OP
Junior Member
zSteam  Offline OP
Junior Member

Joined: Mar 2007
Posts: 99
Germany
hi,

it is possible to clip particles if they touch blocks or models?


=> www.alrik-online.de
A7 Commercial
Re: clip particles [Re: zSteam] #307394
01/28/10 22:53
01/28/10 22:53
Joined: Aug 2005
Posts: 1,185
Ukraine
Lion_Ts Offline
Serious User
Lion_Ts  Offline
Serious User

Joined: Aug 2005
Posts: 1,185
Ukraine
yes, check particle position (what do you like: directly check xyz, use c_content, etc.) and modify particle's lifespan.

Re: clip particles [Re: Lion_Ts] #307433
01/29/10 10:53
01/29/10 10:53
Joined: Mar 2007
Posts: 99
Germany
zSteam Offline OP
Junior Member
zSteam  Offline OP
Junior Member

Joined: Mar 2007
Posts: 99
Germany
hi thanks for reply.


but if use c_content, i don't see any particle

Code:
BMAP* scatter_map = "steam.dds";

// Hilfsfunktion: setzt den Vektor auf zufällige Richtung und Länge
void vec_randomize (var* vec, var range)
{
   vec[0] = random(0.05) - 0.025;
   vec[1] = random(0.05) - 0.025;
   vec[2] = random(0.05) - 0.025;
   vec_normalize(vec,random(range));
}

// Hilfsfunktion: blendet einen Partikel aus
void part_alphafade(PARTICLE *p)
{
	p.alpha -= 2*time_step;
	if (p.alpha <= 0) p.lifespan = 0;
	p.size += (0.75 * time_step);

	if(c_content(p.x,3))
	{
		p.lifespan = 0;
	}
}

// Partikelfunktion: generiert eine verblassende Explosion in vel-Richtung
void effect_smoke(PARTICLE *p)
{
   var temp[3];
   vec_randomize(temp,10);
   vec_add (p.vel_x, temp);

   p.alpha = 25 + random(25);
   p.bmap = scatter_map;
   p.flags |= (BRIGHT | MOVE);
   p.event = part_alphafade; // wechsle zu einer kürzeren, schnelleren Funktion
}




=> www.alrik-online.de
A7 Commercial
Re: clip particles [Re: zSteam] #307471
01/29/10 15:11
01/29/10 15:11
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
From the manual: Don`t use c_content for newer projects...

Re: clip particles [Re: Widi] #311948
02/22/10 14:18
02/22/10 14:18
Joined: Mar 2007
Posts: 99
Germany
zSteam Offline OP
Junior Member
zSteam  Offline OP
Junior Member

Joined: Mar 2007
Posts: 99
Germany
wich command should I use?


=> www.alrik-online.de
A7 Commercial

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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