|
Explosions-Effekte [Aum]
#281802
07/28/09 18:52
07/28/09 18:52
|
Joined: Oct 2005
Posts: 612
Inari
OP
User
|
OP
User
Joined: Oct 2005
Posts: 612
|
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,
// 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
|
|
|
Re: Explosions-Effekte [Aum]
[Re: VeT]
#282043
07/30/09 02:16
07/30/09 02:16
|
Joined: Oct 2008
Posts: 681 Germany
Ayumi
User
|
User
Joined: Oct 2008
Posts: 681
Germany
|
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,.
Last edited by Ayumi; 07/30/09 02:18.
|
|
|
Re: Explosions-Effekte [Aum]
[Re: Ayumi]
#282156
07/30/09 14:54
07/30/09 14:54
|
Joined: Aug 2004
Posts: 1,345 Kyiv, Ukraine
VeT
Serious User
|
Serious User
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
|
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 ) about something like this: http://www.conitec.net/beta/aWINSTART.htm - using WDL-files as configures for lite-c.
|
|
|
Re: Explosions-Effekte [Aum]
[Re: VeT]
#282170
07/30/09 16:05
07/30/09 16:05
|
Joined: Jul 2005
Posts: 1,930 Austria
Dark_samurai
Serious User
|
Serious User
Joined: Jul 2005
Posts: 1,930
Austria
|
Are you sure? I think this forum is ment to talk about scripting in wdl, not only configuring Lite-C with wdl.
ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)! get free version
|
|
|
Re: Explosions-Effekte [Aum]
[Re: VeT]
#282304
07/31/09 08:36
07/31/09 08:36
|
Joined: Jul 2005
Posts: 1,930 Austria
Dark_samurai
Serious User
|
Serious User
Joined: Jul 2005
Posts: 1,930
Austria
|
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.
ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)! get free version
|
|
|
|