Explosions-Effekte [Aum]

Posted By: Inari

Explosions-Effekte [Aum] - 07/28/09 18:52

Hallo,
in den Aum´s gibt es ein Beispiel für Explsoions-Effekte. Leider funktioniert der Effekt mit den herum fliegenen Trümmern nicht,
statt das sie versträut herunter fallen und ein wenig weiter hompsen, fällt nur ein großer Klumpen davon gerade herunter.
Weiß jemand woran der Fehler liegt?

Hier der Code aus den Aum,
Code:
// Eigenschgaft des Effektes
function move_gibbits()
{
	var gib_coords;
	var gib_speed;
	my.passable = on;
	my.scale_x = 0.5 + random(1);
	my.scale_y = my.scale_x;
	my.scale_z = my.scale_x;
	vec_set (gib_coords, my.x);
	gib_speed.x = (10 - random(20)) * time;
	gib_speed.y = (10 - random(20)) * time;
	gib_speed.z = (20 + random(10)) * time;
	my.skill10 = 10;
	while (my.skill10 > 0)
	{
		if (vec_dist (my.x, gib_coords.x) > 70) 
		{
			my.passable = off;
		}
		ent_move (nullvector, gib_speed);
		effect (debris_trail, 1, my.x, nullvector);	
		
				if (bounce.z != 0)
				{
						gib_speed.z = -(gib_speed.z * min(0.8, random(1)));
						if (gib_speed.z < 0.1)
						{
								gib_speed.x = 0;
								gib_speed.y = 0;
								gib_speed.z = 0;
						}
				}
				

		gib_speed.z -= 2 * time;
		my.skill10 -= 0.3 * time;
		wait (1);
	}
	my.transparent = on;
	my.alpha = 100;
	while (my.alpha > 0)
	{
		my.alpha -= 3 * time;
		wait (1);
	}
	ent_remove (my);
}





// Aufruf Funktion des einzelnen Explosions-Effekte
function start_explosion(coordinates)
{
	var sound_volume;
	var number_of_gibbits;
	sound_volume = 30000 / (vec_dist(coordinates.x, camera.x) + 100);
	snd_play (explostart_wav, sound_volume, 0);

...

	number_of_gibbits = random(15) + 5;
	while (number_of_gibbits > 0) // while without wait!
	{
		ent_create (gibbit_mdl, coordinates, move_gibbits);
		number_of_gibbits -= 1;
	}
	snd_play (exploend_wav, sound_volume, 0);
}

Inari
Posted By: VeT

Re: Explosions-Effekte [Aum] - 07/29/09 15:34

Inari, dear friend, why dont you move To Lite-C Programming forum ?
Its "C-Script and WDL", and i see that your questions are about lite-c.
Posted By: Ayumi

Re: Explosions-Effekte [Aum] - 07/30/09 02:16

Cause it s a Wdl code^^
(my question was changed to this forum too).

Ich schau mal,...wollte mir den Code gerade in
lite c umwandeln^^
In wdl code funtioniert er uebrigens wunderbar,.
Posted By: VeT

Re: Explosions-Effekte [Aum] - 07/30/09 14:54

If its WDL code, than, please, write it somewhere in "Gamestudio Forums".
Its "C-Script and WDL - The predecessors to lite-C" forum, here we are talking (well, going to talk smile ) about something like this: http://www.conitec.net/beta/aWINSTART.htm - using WDL-files as configures for lite-c.
Posted By: Dark_samurai

Re: Explosions-Effekte [Aum] - 07/30/09 16:05

Are you sure? I think this forum is ment to talk about scripting in wdl, not only configuring Lite-C with wdl.
Posted By: VeT

Re: Explosions-Effekte [Aum] - 07/30/09 17:31

I thought like this all time smile

Look at the address:
Gamestudio » Forums » Atari lite-C » C-Script and WDL
How C-Script and WDL belong to lite-c in other way, not as configurator? smile
Posted By: Dark_samurai

Re: Explosions-Effekte [Aum] - 07/31/09 08:36

Yes that's logical, but I can't find any other forum that would fit to C-Script programming. And why should we need a forum for configuring Lite-C with wdl? There are only a few commands for that and I don't think that this is worth an own forum.
Posted By: Xarthor

Re: Explosions-Effekte [Aum] - 07/31/09 10:29

IMHO VeT thats no quite correct.
From my understanding the "C-Script and WDL" forum is meant for users who still work with C-Script and have questions about it or problems regarding it.
So this topic fits here just well.
But thats only my humble opinion.

@Inari:
Could you provide a small test level including files and the script for the explosion as package that we could download and test?
From the code I cannot see any mistakes there currently.
© 2024 lite-C Forums