Difficulty in positioning character in level

Blitz3D Forums/Blitz3D Beginners Area/Difficulty in positioning character in level

sec05(Posted 2004) [#1]
Hi, I have got a problem here.

Well, I've made a level and a character in 3d studio max and have imported them seperately into blitz using the loadmesh command.

The problem I'm facing is the positioning of the character into the level. My level consists of three rooms, let say room A, room B, and room C. When I run the level, the character is like floating far away from any of the rooms.

I wanted the character to be in room A. So, I have to roughly gauge the coordinates of the character, change them, run the level, change the coordinates again, run the level, change coordinates again, bah, bah, bah..... until I get the correct position. This is pretty tedious work if there's alot of objects in the level and I have to get them all in the correct position.

So, is there any solution to this problem?


AdrianT(Posted 2004) [#2]
if you build your max scene in max units, then 1 max unit = 1 blitz unit. then the simplest way to get your character where you want it is to position your level in max so 0,0,0 world coordinates is where you want your character to appear. then load your mesh in blitz at 0,0,0 and it will be i that exact spot. remember to move the pivot for your character object to its base, or offset the character in blitz or it may end up being half way through the floor.

Thats the simplest method thar requires almost no coding at all.


Who was John Galt?(Posted 2004) [#3]
I usually create a routine to move the character around with the joystick and display the coordss on screen - then just hard code the coords.


PowerPC603(Posted 2004) [#4]
You could always add a pivot in Max, called "PlayerStart" or something else.

Then in code, you just scan the entire level with the FindChild command for an object called "PlayerStart".
When you found it, get the coordinates (EntityX, EntityY and EntityZ) of that child and just position your character at these coordinates.

Note: this only works if you load the level with the LoadAnimMesh command (Blitz keeps the hierarchy in the level-file).


Berserker [swe](Posted 2004) [#5]
Is there any other programs like "Milkshape" or "SlimShady" (thoose are the ones i've herd of) that can create pivots in a map?
Cuz i would wreally need it and it dont wanna buy 3DsMax either. Frankly it's to darn expensive for me and id like to finish my projekts in a honest way, if you know what i mean.


Defoc8(Posted 2004) [#6]
You dont need to create a "Pivot"...
- simply create a mesh called "pivot" or "start", use
the findchild command...hide it...then position your
character at the childs position... - this will work for
any model format that blitz supports...
- You must however ensure that you load the meshes with
loadanimmesh() - or the scene hierarchy will be ignored..

i use ".3ds" files in my space game + simply parse for
mesh style nodes..though as i use them as mount points, i
creating pivot + position them at the mesh position &
orientate based on the mesh orientation, then i simply
delete the original child meshes ;)

hope that helps


jhocking(Posted 2004) [#7]
"Is there any other programs like "Milkshape" or "SlimShady" (thoose are the ones i've herd of) that can create pivots in a map?"

What you're talking about is a dropper. These are pretty easy to code yourself, but for an existing (and free) one look at Droplet. It's available for download at Farley's site: www.mentalillusion.co.uk


sec05(Posted 2004) [#8]
Thanks for the reply.

Falken, you said something about routine right? What is routine? And how do I code one?


Berserker [swe](Posted 2004) [#9]
"These are pretty easy to code yourself"
I dont like to have alot of code for every level (even if its easy code), maybe i should have external files named "Map1.stuff, Map2.stuff and so on..." where the different things such as chairs, cars, buttoms and such is stored?

These things can then be read in a smart function "LoadMap(Map,Type)" or something.
Is this a reasonable sulotion?

I think i should try that program anyway...
Thanks!


sec05(Posted 2004) [#10]
How do I download the droplet software? It says something about the username and password.


Caff(Posted 2004) [#11]
I think there is a problem with the www.mentalillusion.co.uk website at the moment - and the owner has gone away on holiday for two weeks!

Maybe someone round here has droplet on their hard disk and can e-mail it to you?

If not then try to code something yourself - coding an editor will definitely help you in the long term if you are new to Blitz.