Most asked questions

Top  Previous  Next

Q: How can I add a 1st person camera to your cameras in Aum4?

A: Here's some code that adds the 1st person camera code (add these lines in the same function):

 

if (key_5 == 1)
{
  camera_number = 5;
}

if (camera_number == 5) // 1st person view
{
     aum_camera.x = player.x;
     aum_camera.y = player.y;
     aum_camera.z = player.z;
     aum_camera.pan = player.pan;
     aum_camera.tilt = player.tilt;
     aum_camera.roll = player.roll;
}

Q: I've declared a bmap and am showing it through a panel. The bmap is true color but whenever I display it the image looks like it has only 16 colors! How do I fix this problem?

A: Make sure that the No D3D box is not checked before running the level. Check your script and make sure that you have video_depth set to 16 or 32, not 8. Another possibility for a loss of colours in a panel is that you display this panel in non-d3d mode. Take care that it's D3D flag is set when you want the full colour range for that panel.

 

Q: How can I adjust the palette for my models? I have converted some MD2 models to MDL but they look weird when they're in the game.

A: Quake2 have 256 colors skins, not true color like A4/ A5. Export your MD2 skin, increase its number of colors and save it. Import the skin and place the model with the new skin in Wed - everything will work fine.

 

Q: Is there a way I could play a piano in my game? I could use the numbers 1 - 0 to play it.

A: The easiest way is to have a few wave files and play one of them when you press a key; use something like this:

....................
while (1)
{
  if (key_1 == 1) {play_sound do_snd, 100;}
  if (key_2 == 1) {play_sound re_snd, 100;}
  if (key_3 == 1) {play_sound mi_snd, 100;}
...................
   wait (1);
}

Q: I'm a newbie and I don't know how to use weapons. Please help me!

A: A5 comes with several weapon examples. Place a gun model in wed and attach it one of the following actions: weap_mg_animated, weap_m16, weap_rocketlauncher, logangun, shotgun, lasergun, sparkgun, flashgun.

 

Q: I tried to develop some code that gives the choice of choosing the type of music in the game (for example heavymetal / techno) I but couldn't do it. Does anyone know how to do this?

A: You will have to create two buttons (Heavy and Techno) on a panel.

bmap heavy1_map...
bmap heavy2_map...
bmap techno1_map...
bmap techno2_map...

var heavy = 0;
var techno = 0;

button 50, 200, heavy1_map, heavy1_map, heavy2_map, null, set_heavy, null;
button 50, 250, techno1_map, techno1_map, techno2_map, null, set_techno, null;

function set_heavy()
{
   heavy = 1
   techno = 0
}

function set_techno()
{
   heavy = 0
   techno = 1
}

if (heavy == 1)
{
    play_heavy_music_here
}
if (techno == 1)
{
   play_techno_music_here
}
........................................

Q: How many entity monsters (about quake's grunt size) can a5 handle at the same time; 5 -6 or more?

A: Take a look at thie picture below; there are 30 animated models and the frame rate goes from 75 fps (no models) to 55 fps (30 models) - I say that's not a big frame rate loss.


Q: How can I use decals?

A: Decals are nothing more than one-sided sprites; they are useful for posters, marks on the walls, etc. All you have to do is to set the oriented flag for the sprite (or change its pan, tilt or roll angle a little bit in wed) and then check its metal flag.


Q: I am using Stratego as a base for my strategy game but I can't add gravity to my units. Can you help?

A: Here's some code from one of my projects - this works on level blocks and terrain (put this in a while loop):

robot1_speed.x = 10 * time;
robot1_speed.y = 0;
vec_set (temp, my.x);
temp.z -= 1000;
trace_mode = ignore_me + ignore_sprites + ignore_models + use_box;
robot1_speed.z = -trace (my.x, temp);
.........................................................................................
ent_move (robot1_speed, nullvector);
ent_cycle("walk", my.skill10);
my.skill10 += 5 * time;
if (my.skill10 > 100) {my.skill10 = 0;}

Q: Can I have an entity that says something like "Don't touch the guard dude!" when I come close to it?

A: Here's Realspawn's answer:

 

string textap_str = "Dont touch the guard dude !";

function text()
{
       msg.string = textap_str;
       show_message();
       wait(1); // time for message to become visible
}

function show_text
{
   my.enable_impact = on;
   my.event = text;
}