function
player_flies()
{
............
while (flying)
{
player.x = helicopter.x;
player.y = helicopter.y;
player.z = helicopter.z;
player.pan = helicopter.pan;
player.tilt = helicopter.tilt;
player.roll = helicopter.roll;
wait (1);
}
}
Q:
When I run my map all I get is nothing but a black screen with "A5" written
in the far top right corner and nothing shows up, even after about fifteen
minutes.
A:
The camera (your "eye" inside the 3D world) is placed outside the level
- that's why you can't see anything. Place a model inside the level
and assign it the action named "player_walk_fight".
Q:
I use your Resident Evil camera from Aum4 in my game and everything works
swell until I move to the 2nd floor of the building. If my player gets
closer to one of the ground floor cameras, it will switch to it (even though
I am still on the 2nd floor above the camera). How can I fix that?
A:
Add another statement to the "if" instruction in function fixed_cameras():
if
((camera_position[temp_counter] < winner && camera_position[temp_counter]
> 0) && (player.z < 200))
{
...
}
The idea is to trigger the cameras at the floor level only if the player has a similar z position. You should also add:
while(player == null) {wait (1);}
as
the first line of code in function fixed_cameras() to prevent the player
= null error message.
Q:
Some models (quake2 mdl files) don't run properly in 3DGS; when I assign
them the function "player_walk" they don't show walking animation when
I walk with them. The models include walking animations.
A:
If you want to use the template scripts you have to make sure that the
names of the frames are identical with the ones required by the templates:
"stand", "walk", "run", "duck", "swim", "dive", "jump", "crawl". If your
walking animation has 12 frames, the names of these frames should be walk01...walk12
and so on. If your md2 file uses move01..move12 for its walking animation,
it won't work.
Q:
I would like to have an enemy generator; when I kill an enemy, another
one should replace it and so on. Is it possible?
A:
Sure. Copy and paste the code below at the end of your office.wdl file,
place any model in Wed and attach it action enemy_generator:
string guard_mdl = <guard.mdl>;
entity* my_enemy;
action
enemy_generator
{
my.invisible = on;
my.passable = on;
while (1)
{
my_enemy = ent_create(guard_mdl, my.pos, actor_ai_one);
while (my_enemy != null) {wait (1);}
wait (1);
}
}
Q:
If you want mipmaps on your model, do the skin measurements have to be
a power of 2 and / or be square?
A:
No, it isn't necessary; however, using rectangular or square textures with
sizes that are powers of 2 will increase the speed a little.
Q:
How can I change the keys to jump in player_walk_fight?
A:
Open input.wdl and look for this line of code in function _player_intentions().:
force.Z = strength.Z*(KEY_HOME-KEY_END); // up and down
The following example changes the keys for jump and crouch to "S" and "X".
force.Z
= strength.Z*(KEY_S-KEY_X);
// up and down
Q:
I get an error 041 - lightmap space overrun, but I don't see this anywhere
in the manual. What does this mean?
A:
Your level is too big and the memory used for the lightmaps is huge. Use
one of these two methods:
-
Decrease the size of the level;
-
Select the big level blocks (or all the blocks) and set their surfaces
to "flat".
Q:
I have a var defined this way: var
force[3]; let
say I execute this line force
= 4; will
the content of force be 4, 4, 4 or 4, 0, 0?
A:
The var named force will be set to (4, 0, 0); by the way
var force[3]; is similar (and
works the same) with
var force;
Q:
I would like to know if anyone has an example for custom acknex.wdf files.
A:
Here's my simple yet fully working wdf template. Make sure that the picture
has 256 colors (shouldn't be true color).
WINDOW
WINSTART
{
TITLE "(c) Your company 2003";
SIZE 576, 288; // size of the image in pixels
MODE image; // standard
BG_COLOR RGB(0,0,0); // black background
FRAME FTYP1, 0, 0, 576, 288; // same size here
SET FONT "Arial", RGB(0,0,0); // draw black text
PICTURE <your_image.bmp> , opaque, 0, 0;
}
Use
CAPS - it matters!