Q: I was wondering how can I create a fixed camera? Just like some shops in Resident Evil.

A: Use the code in recam.wdl and comment these lines:

vec_set(temp, player.x);
vec_sub(temp, my.x);
vec_to_angle(re_camera.pan, temp);
 
 

Q: I was just about ready to animate my model for a gun in first person view and was wondering if frames per second will matter a lot? I was probably going to do maybe around 20 to 30, is this too high or does it even matter?

A: The only things that should concern you are the size of the skin and the number of polygons. You can have as many animation frames as you want - this is true for all the models in your game.
 
 

Q: I need some with the scripts. I want to play a wav file when something happens or just play it anywhere in the level.

A: Here's a small sample:

function playit()
{
   play_sound my_snd, 50;
}

action impact_sound
{
    my.enable_impact = on;
    my.event = playit;
}

To play a sound anywhere in the level, copy it in your game folder ("work" in office demo) add it in Wed with Add Sound and set its orientation, volume and range.
 
 

Q: How can I run a certain function when I pick up a weapon?

A: If you are using the standard (template) weapon actions, you have to modify

function gun_pickup()
{
...............................................................
     if(weapon_number == 1) {  weapon1 = ME; weapon_1 = 1;  ON_1 = _gun_select1;  msg.STRING = got_gun1_str; }
     if(weapon_number == 2) {  weapon2 = ME; weapon_2 = 1;  ON_2 = _gun_select2;  msg.STRING = got_gun2_str; }
     if(weapon_number == 3)
     {
          your_function();
          weapon3 = ME;
          weapon_3 = 1;
          ON_3 = _gun_select3;
          msg.STRING = got_gun3_str;
     }
..............................................................

Your_function() is called when you pick up weapon number 3 in this example.
 
 

Q: I want to build a level where you can drive a car. I have no clue how to do this.

A: The template includes a simple car driving action; attach this action to your car model and you're ready to go.

action player_drive2
{
    my._MOVEMODE = _MODE_DRIVING;
    my._FORCE = 1.5;
    my._BANKING = 0.1;
    my.__SLOPES = ON;
    my.__TRIGGER = ON;
    my.flag2 = on;
    player_move();
}

 

Q: When I put some textures on to objects (in this case marb_41) it looks fine while editing in WED, but when I BUILD it the colours go wierd... I fix this problem by making it True Colour and then save it but when I exit the WED then go back into it I have to do the same thing again.

A: Your wad file is read-only. Right click it, uncheck the Read-only tab, click Apply then Ok and everything should work fine.

 

Q: If I compile my level with preview off (ie final build) on a seperate P.C. just for compiling, when it has eventually finished which files do I copy across to my other P.C to get the 'final' build version here?

A: You only need to copy yourlevel.wmb to the new computer.
 
 

Q: How can I create a panel that says "Loading..." before loading the level?

A: Here's the code that displays the panel for two seconds:

...........................
loading.visible = on;
load_level (<level1.wmb>);
waitt(32);
loading.visible = off;
..........................
 
 

Q: Is there any way to change the actionoff for a button so that it is triggered with a right click instead?

A: Create a while loop and check if mouse_right = 1 inside it. If this is true and the mouse is over your button (use pointer.x and pointer.y to check that) you can call the function. I have created some similar code in AUM2; replace mouse_left with mouse_right and you'll get what you want.

 
 
Q: I need some code for a camera following a path (my view in fact). I tried with patrol_path, but it doesn't work on my entity, only with another entity
 
A: First of all you need to disable the default view (camera) using camera.visible = off. Create a new view, make it visible, create a synonym (pointer) to the entity that walks on your path and follow its movement in a while loop the way I did it in cameras.wdl.
 
 

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

This question was answered in AUM3 but here's another correct answer from Master PSCJ:

A: You can use vec_to_screen(vector,view) - here's an example:

vec_set(position,my.x);  // copy entities's coordinates
vec_to_screen(position,camera); // convert to screen coordinates
panel.pos_x = position.x; // display the coords on the panel
panel.pos_y = position.y;