Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,449 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Game Freezing up in 'Main Mode" #69844
04/06/06 04:43
04/06/06 04:43
Joined: Sep 2002
Posts: 199
Chicago, Illinois
Thehawk Offline OP
Member
Thehawk  Offline OP
Member

Joined: Sep 2002
Posts: 199
Chicago, Illinois
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

Re: Game Freezing up in 'Main Mode" [Re: Thehawk] #69845
04/06/06 18:53
04/06/06 18:53
Joined: Sep 2002
Posts: 199
Chicago, Illinois
Thehawk Offline OP
Member
Thehawk  Offline OP
Member

Joined: Sep 2002
Posts: 199
Chicago, Illinois
Basically what i'm trying to do is give the player control via the mouse cursor for the start menu. That control is then turned over to the model with the "PlBiped01" action when the game loads the "HL0" (or first) level of the game.

Is there an easier way to accomplish this?

Re: Game Freezing up in 'Main Mode" [Re: Thehawk] #69846
04/08/06 09:40
04/08/06 09:40
Joined: Nov 2004
Posts: 888
B
beegee Offline
User
beegee  Offline
User
B

Joined: Nov 2004
Posts: 888
Can you show an image of your game? I can't imagine this what you trying to do. And why do you change the mouse bitmap all the time?(it doesn't make sence, or?)
But your problem is, that you can't control your player after the main menue. But in your last posting, you asked for an easier way to accomplish. OK, in the main menue must you press on a specific panel?

Regards,
beegee

-----------------------------
GenuineMotors.de


Fratch - Newer statistics panel for GameStudio
Re: Game Freezing up in 'Main Mode" [Re: beegee] #69847
04/08/06 09:53
04/08/06 09:53
Joined: May 2005
Posts: 454
Glasgow, Scotland
Lost Offline
Senior Member
Lost  Offline
Senior Member

Joined: May 2005
Posts: 454
Glasgow, Scotland
You don't have to worry about changing control over.

The mouse isn't seen as an entity. It doesn't have any behaviour. All that needs done is for it to be switched off as you do.

What you do need to worry about is checking you've used the plbiped script right. Have you given him skill values for example? Other than that just make sure your camera is set and there shouldn't be any problems at all.

Tinker around with the skill values and if your still stuck then get back to us with a screenshot.


Lost Games WIP - Nysho and the Attack of the Boons Rise up and flame me like the prepubescent man you outa be son!
Re: Game Freezing up in 'Main Mode" [Re: Lost] #69848
04/08/06 15:50
04/08/06 15:50
Joined: Sep 2002
Posts: 199
Chicago, Illinois
Thehawk Offline OP
Member
Thehawk  Offline OP
Member

Joined: Sep 2002
Posts: 199
Chicago, Illinois
I'm not stuck anymore..... I replaced the template plbiped01 action with a player_move action that I did based on another tutorial.

It works as I want it to for the most part. I'm not sure why I had trouble with the template player action. (Maybe the camera?)

Here's some screens of the original problem anyway.



That's the "wall' the camera looks at while in the second level (hl0)



and that's the title screen.


Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1