Hello,
Please bear with me as I try to explain this problem. I wanted to do a simple menu screen that allowed the player to start a new game. (Like the Planet Survivor tutorial)
I got the main screen to work more or less. Here's the code example
Code:
function main()
{
fps_max = 50;
freeze_mode = 1;
level_load (intro_wmb); // dummy level
wait (3);
freeze_mode= 0;
time_smooth = 0.9; // use a value for "time" that is the average of the last 10 frames
mouse_spot.x = 31; // ~ 63 / 2
mouse_spot.y = 17; // ~ 35 / 2
camera.x = 0; // choose a convenient camera position
camera.y = 0;
camera.z = 350;
camera.tilt = -90; // and angle
mouse_mode = 2; // show the pointer
while (game_started == 0) // as long as we haven't started the game
{
mouse_pos.x = pointer.x;
mouse_pos.y = pointer.y;
if (random (1) > 0.95) // use the second bitmap for the pointer every 20 frames (or so)
{
mouse_map = pointer2_tga;
}
else
{
mouse_map = pointer1_tga;
}
wait (1);
}
}
function start_level1()
{
mouse_mode = 0; // hide the pointer
// snd_stop (engine_handle); // stop the engine sound
main_pan.visible = off; // hide main_pan
level_load (level1_wmb); // load the first playable level (runs level1.wdl when it is loaded)
}
I even included the plBiped.wdl since I wanted to use it. (It's included in the main.wdl file since this is my main code base)
The action 'Plbiped01' appeared in the behaviors panel in the "HL0" Level (The 1st level of the game). When I click "start game" the "HL0" level is loaded, but I can't control the player. (I did apply the Plbiped action to guard model and rebuilt the level) I would like to hear of any insight someone can provide me with. Please let me know if this is unclear in anyway.
Thanks in advance,
Marvin