Jump to content

gamelib KeyboardMove


Carve
 Share

Recommended Posts

It should work, I haven't noticed any problems with it. What exactly does not work?

 

pre-main loop:

	mPlayer.Create();
mGame.scene.SetCurrentPlayer("info_playerstart");
mGame.scene.SetCurrentPlayer("player1");

main loop:

		mGame.MouseLook(mGame.scene.cam);
	mGame.KeyboardMove("player1");
	mGame.PositionPlayerModel("player1");
	mGame.PositionCamera();

 

all this works , except the KeyboardMove("player1");

Link to comment
Share on other sites

Yes, but what exactly does not work? Is it not moving, is it not compiling, or what? Make sure you have a body mass for your player also.

Why are you creating the player, if it's already in the sbx file?

You should need only one SetCurrentPlayer().

The Power Tutorial should work.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

Yes, but what exactly does not work? Is it not moving, is it not compiling, or what? Make sure you have a body mass for your player also.

Why are you creating the player, if it's already in the sbx file?

You should need only one SetCurrentPlayer().

The Power Tutorial should work.

 

 

It is not moving, like at all.. I can move the mouse and zoom in/out just fine. When trying to set the "pistol" to the player it crashes, so for now that is disabled.

 

I've removed the player creation, and removed the secondary SetCurrentPlayer portion. Still behaving the same way, no movement, except for the camera/mouse.

Link to comment
Share on other sites

It really sounds like you don't have a model for the player in Editor, or it doesn't have a mass.

But since your description is so vague, I think you need to post a minimized demo to show the problem.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

It really sounds like you don't have a model for the player in Editor, or it doesn't have a mass.

But since your description is so vague, I think you need to post a minimized demo to show the problem.

 

What portion of the "Power Tutorial" adds a model for the player? Afaik it's using the info_playerstart?

Link to comment
Share on other sites

What portion of the "Power Tutorial" adds a model for the player? Afaik it's using the info_playerstart?

Yes the tutorial reads the player from the map as far as I remember (don't rely on me for this :)) but I found that you should use the info_playerstart model (or better .lua) which is inside the archive attached to the tutorial, before I had some issues with the one downloaded from the download section of this site (don't remember exactly what).

?? FRANCESCO CROCETTI ??

http://skaredcreations.com

Link to comment
Share on other sites

Basically any model can be called info_playerstart. It's just a placeholder. I'm a bit confused why people have problem with such simple things which are documented :)

Maybe I need to make a single rar file which you can just extract and run, although then the learning effect will be zero by free will.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

Yes the tutorial reads the player from the map as far as I remember (don't rely on me for this :)) but I found that you should use the info_playerstart model (or better .lua) which is inside the archive attached to the tutorial, before I had some issues with the one downloaded from the download section of this site (don't remember exactly what).

 

Thanks ZioRed!

 

I totally overlooked the custom playerstart! That was my problem all along heh :P

Link to comment
Share on other sites

Basically any model can be called info_playerstart. It's just a placeholder. I'm a bit confused why people have problem with such simple things which are documented :)

Maybe I need to make a single rar file which you can just extract and run, although then the learning effect will be zero by free will.

Yes it's a simple placeholder but you have hardcoded some properties with your gamelib (as strength, and some few other as I remember) which are not documented (if I remember well) :P

?? FRANCESCO CROCETTI ??

http://skaredcreations.com

Link to comment
Share on other sites

They are extenstions, like OpenGL has extensions!

GameLib is basically full of extensions to LE, nothing else :)

But I'm happy you found the missing piece in the documented Wiki.

So nothing for me to fix.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...