0 registered members (),
1,397
guests, and 7
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Smoke Bug?
#262779
04/25/09 20:53
04/25/09 20:53
|
Joined: Apr 2009
Posts: 113 Netherlands
Dreher
OP
Warez Victim
|
OP
Warez Victim
Joined: Apr 2009
Posts: 113
Netherlands
|
Hello, I'm using the smoke code from Aum60 (As it's exactly what I'm looking for), but there is something wrong with it!
function fade_smoke()
{
my.alpha -= 0.15 * time; // particle fading speed
if (my.alpha < 0) {my.lifespan = 0;}
}
function smoke_effect()
{
my.bmap = smoke;
temp.x = random(1) - 0.5; // move a bit on the x
temp.y = random(1) - 0.5; // and y axis
temp.z = random(2); // but always move upwards on the z axis
vec_add (my.vel_x, temp);
my.alpha = 10 + random(20);
my.size = 5; // size of the smoke
my.bright = on;
my.move = on;
my.lifespan = 50; // lifespan for the smoke particles
my.function = fade_smoke;
}
starter generate_smoke()
{
while (diamond == null) {wait (1);}
while (1)
{
vec_for_vertex (temp, diamond, 2617); // generate smoke from the 246th vertex on the player model
effect (smoke_effect, (2 / (time_step + 0.1)), temp.x, normal);
wait (1);
}
}
I can't think of something, it should work
A7 7.77
|
|
|
Re: Smoke Bug?
[Re: Dreher]
#262792
04/25/09 21:53
04/25/09 21:53
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
It looks like something is wrong with your BMAP "smoke". Ive not used this code, but I think the BMAP needs to have an alpha channel (for transparency), like TGA for example.
The solid grey squares tells me something is wrong with the BMAP, but their positions look OK.
Try using "smoke.tga" from the "x:/GStudio7/templates/images" folder of your install.
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
Re: Smoke Bug?
[Re: EvilSOB]
#262797
04/25/09 22:14
04/25/09 22:14
|
Joined: Apr 2009
Posts: 113 Netherlands
Dreher
OP
Warez Victim
|
OP
Warez Victim
Joined: Apr 2009
Posts: 113
Netherlands
|
Isn't gonne work..
BMAP* smoke_tga = "C\Program Files\GStudio7\template_6\images\smoke.tga";
function fade_smoke()
{
my.alpha -= 0.15 * time; // particle fading speed
if (my.alpha < 0) {my.lifespan = 0;}
}
function smoke_effect()
{
my.bmap = smoke_tga;
temp.x = random(1) - 10.5; // move a bit on the x
temp.y = random(1) - 10.5; // and y axis
temp.z = random(2); // but always move upwards on the z axis
vec_add (my.vel_x, temp);
my.alpha = 10 + random(20);
my.size = 5; // size of the smoke
my.bright = on;
my.move = on;
my.lifespan = 50; // lifespan for the smoke particles
my.function = fade_smoke;
}
starter generate_smoke()
{
while (diamond == null) {wait (1);}
while (1)
{
vec_for_vertex (temp, diamond, 2617); // generate smoke from the 246th vertex on the player model
effect (smoke_effect, (2 / (time_step + 0.1)), temp.x, normal);
wait (1);
}
}
starter generate_smoke()
{
while (diamond == null) {wait (1);}
while (1)
{
vec_for_vertex (temp, diamond, 2516); // generate smoke from the 246th vertex on the player model
effect (smoke_effect, (2 / (time_step + 0.1)), temp.x, normal);
wait (1);
}
}
When trying to run, it says: (): Bitmap unkown C BTW, I'm on XP ><
Last edited by Dreher; 04/25/09 22:14.
A7 7.77
|
|
|
Re: Smoke Bug?
[Re: Dreher]
#262802
04/25/09 23:53
04/25/09 23:53
|
Joined: Jul 2005
Posts: 38
ngisiger
Newbie
|
Newbie
Joined: Jul 2005
Posts: 38
|
Hi! I agree with EvilSOB (yikes! ) The code seems to work: it's just the aspect of the bitmap used as particle which is problematic. Either the bitmap you use is somehow incorrect (YMCK or grayscale or indexed format, etc.) or A7 can't find it and uses a grey square instead of a bitmap (I think that's the default mode). Maybe try copying the bitmap smoke.tga in the folder of your game, and rename smoke_tga accordingly. Hope this helps! Thomas
|
|
|
Re: Smoke Bug?
[Re: ngisiger]
#262806
04/26/09 01:01
04/26/09 01:01
|
Joined: Apr 2009
Posts: 113 Netherlands
Dreher
OP
Warez Victim
|
OP
Warez Victim
Joined: Apr 2009
Posts: 113
Netherlands
|
Ok, I got it fixed, the code I use now (With the smoke.tga within the game folder)
BMAP smoke_tga = "smoke.tga";
function fade_smoke()
{
my.alpha -= 0.15 * time; // particle fading speed
if (my.alpha < 0) {my.lifespan = 0;}
}
function smoke_effect()
{
my.bmap = smoke_tga;
temp.x = random(1) - 0.5; // move a bit on the x
temp.y = random(1) - 0.5; // and y axis
temp.z = random(2); // but always move upwards on the z axis
vec_add (my.vel_x, temp);
my.alpha = 10 + random(20);
my.size = 5; // size of the smoke
my.bright = on;
my.move = on;
my.lifespan = 50; // lifespan for the smoke particles
my.function = fade_smoke;
}
starter generate_smoke()
{
while (diamond == null) {wait (1);}
while (1)
{
vec_for_vertex (temp, diamond, 2617); // generate smoke from the 246th vertex on the player model
effect (smoke_effect, (2 / (time_step + 0.1)), temp.x, normal);
wait (1);
}
}
I hope this will help other people out aswell ^^ And thanks to you too of course!
Last edited by Dreher; 04/26/09 01:02.
A7 7.77
|
|
|
|