Most asked questions

Top  Previous  Next

Q: Every time I run my level it comes up with 'bad texture animation' '+01elpan' I know '+01elpan' is a texture and I know what it looks like, I just can't find it anywhere. Is there any way to find that texture on my level or to correct the error?

A: Create a simple pink texture with paint shop pro, name it +01elpan and add it to your wad. Build the level and run it. Unless you're creating a pig farm level, you should be able to see all the surfaces that are using the +01elpan (pink) texture. Replace the texture everywhere, save the level and you can safely remove the pink texture from your wad.

 

Q: “How can I emit particles from the surface in the direction of surface normal? I know I can get the position from ent_vertex but how can I get a list of all vertices and their normals?”

A: Youll have to wait a few weeks; vec_for_normal(vector,entity,number) works like vec_for_vertex, but returns the vertex normal too. The vertex normal is computed from the average of the normals in that area. This instruction will be included in the next free update.

 

Q: I was wondering if there was a way to "nullify" the gravity in the game during a certain function.

A: If youre using the standard movement.wdl, you can change the gravity variable. Take a look at rope.wdl in this AUM to see how I did it.

 

Q: I'm currently putting together a space simulation. I need a moving starfield that moves along with the player's spacecraft, to show speed and movement.

A: Use one or several transparent, passable, animated sprites or models and move them with the player using an action that looks like this:

 

action follow_player
{
my.transparent = on;
my.passable = on;
my.oriented = on;
while (1)
{
my.x = player.x;
my.y = player.y;
my.z = player.z;
my.frame += 2 * time; // animate the sprite
if (my.frame  > 10) {my.frame = 0} // loop animation
wait (1);
}
}

Q: How do you get a particle to give off light? Can I call it up during the emit function? Or does it need to be a separate action?

A: Particles cant emit light, but you can attach to them a little sprite or model using their my_pos coordinates. You shouldnt have more than 32 dynamic light sources at the same time, so youll have to attach light only to some of them or emit a few particles a second.

 

Q: Is it possible to convert a .pk3 file to an .mdl file? If so how?

A: Quake3s pk3 files are actually zip files. All you have to do is rename the .pk3 file to .zip then you can unzip it and see all the resources, including the md3 (Quake3s mdl) files.

 

Q: I want to make a 3rd person game and I want my main character to be rather detailed. I decided to try to use sprites instead of a high poly count model. I made a test script with a bitmap and tested it. The problem is that the edges around the character do not come out transparent and any dark areas show holes. How do I get rid of this?

A: Use the new ent_alphaset instruction to make the edges smoother. Increase gamma for your sprites to lighten them a bit. RGB = 999 is still black but it wont be transparent for the engine.

 

Q: The WDL function random(x) returns a random fractional number between 0 and x. However, from one run to the next, the sequence is always the same. Is there some way to seed the random number generator?”

A: Create a function that uses total_ticks (the time passed since the start of the game) as a parameter and everything will work fine.

 

Q: I'm wondering how to convert a 3D vector position (from the camera view) into a 2D panel position. Any ideas?

A: If you know the level boundaries, you can easily convert the positions using something like this:

panel_pos_x = abs (entity_x level_min_x) / scaling_factor_on_x;
panel_pos_y = abs (entity_y level_min_y) / scaling_factor_on_y;

This works fine for a panel in the upper left corner of the screen. Every entity should use this code in its action (in a while loop) if you want it to be displayed on the panel.

 

Q: I am trying to make a 3d adventure game and my character has a gun that shoots bubbles. How can I make him shoot bubbles?

A: Create a gun that shoots using fire_ball as fire mode and replace blitz.pcx with your bubble.pcx in template.