If you look in the main loop , you find code like this:
if ( GetRawKeyState( 87 ) )
moving = 1
MoveCameraLocalZ( 1, speed# )
endif
This is moving the camera around.
Just after this you find this function: movecamera()
This is taking care of all collision and placement of the camera.
To do a simple TTP camera, you could just use the camera position, it already have all the
collision you need. So a logic like this:
1. after movecamera() place your character exactly at the camera position.
2. just before sync() save camera position, move camera backward “MoveCameraLocalZ(1,-200)” and perhaps up.
3. just after sync() restore camera pos you saved.
You can control the characters animation depending on the key used: search (GetRawKeyState)
If you want a smooth moving camera you can use <> to move the camera.
Perhaps add a raycast from camera to player , if you hit anything make that object transparent so your still able to see the player char behind other objects.
Swimming: The waterline can move up down , but there is a global you can use “waterlevel#” , so if:
GetObjectY( TTPchar ) < waterlevel# , use swim animation , and perhaps setobjectposition = waterlevel# , so he floats move up down with the water.
Easy way to make many levels , is to make ALL your level on the same gameguru level. just hide the different levels with , walls/hills and use the GG “invisible wall” to prevent player from going from one to another level. This way you can just “move” to player/camara position to a new location to switch level.
To switch to a complete new gameguru level , you could save it in another folder , by defaults GG Loader use “gameguru/“ if you place your second level inside a folder called “gameguru2” , then search for “gameguru/“ in the code you see functions like this: preparemedia("gameguru/map.ent”) , loadgameguruobjects("gameguru/map.ele",0) , keep searching for “gameguru/“ and you see what need to be changed. Perhaps make a global levelpath$ = “gameguru/“ , and use this everywhere instead , so you can just change this , and use the same functions. Your in for some coding to do this, i will see if a can make it easier to do this in a later version.
To get your media working , make sure you don’t use scaled bones , AGK don’t support this , export your characters to .x format , make a folder inside gameguru/files/entitybank/ and place all your object there , you will need to make .fpe files for all your object. if you can use .dds textures then do this, they will be converted to png later , but this way objects will work in both GameGuru and AGK. When you got your media working in GameGuru you can just use the converter to get it into AGK
Ha ha a swimming goat, it will be great to see some screenshot when you get it into GG
best regards Preben Eriksen,