Free FPS shell! Code?!?

Blitz3D Forums/Blitz3D Programming/Free FPS shell! Code?!?

Kozmi(Posted 2004) [#1]
Does anybody know if Rob used gile[s] to export that level he used in the Free FPS shell!! demo???
The reason im' asking is because I loaded that level into gile[s] to see how he setup the naming conventions used for the sky in that level that doesn't seem to have any collison on it! Im' using his code for my Egyptian Tomb level, And I was wanting to be able to locate and find the torch's in my .B3D level to be able to attach the particle emitters to them that way!

I was using this code here:

;remove collision on sky (a hack cos I didn't want to go back and change the level - not necessary)
sky=FindChild(GetChild(level,1),"Plane02")
EntityType sky,0


I got the idea that the Plane02 was a basic property
setting through gile[s] and all. And all I thought I had to do was get the name of the torch in my .B3D file that I want to use to attach the particle emitter to! But!! When I replace the Plan02 with torch1 I get an Entity does not Exist error?!? Why would you think it would be doing this? Any suggestion would be greatly appreciated very much so!

I also got a stupid question that needs to be asked as well.. In this code fragment here:

;picks
;level has a root node, so get first child of that
child=GetChild(level,1)
For i=1 To CountChildren(child)
	EntityPickMode GetChild(child,i),2
Next


;level has a root node, so get first child of that

What exactly is a node ?!? I've heard others talk about this before... And Im' a little lost regarding it's meaning? Can anybody please explain this?

Thank's for you help in advance guys! :)


Rob(Posted 2004) [#2]
plane02 was just the name of the object... I could have renamed it to anything like sky in gile[s] but I couldn't be bothered :)

root node? simple :)

Think of a 3d model being a directory of folders
some are nested inside others.

When a model is exported, often there is a parent, or root to the model. This is where the model starts and all the other bits of the model are inside this. So to search, I needed to look beyond the first child. Cos the first child is the root, and other children are inside that root...

;level has a root node, so get first child of that

Yep, so I start searching inside the first child instead.

That code could be a lot better organised...


Kozmi(Posted 2004) [#3]
I think your code is pretty well organised to me! And thanks for your kind post Rob! But!!!!

plane02 was just the name of the object... I could have renamed it to anything like sky in gile[s] but I couldn't be bothered :)

Forgive me for asking this Rob, But how exactly do you go about looking for a certain object in your .B3D file then? I mean... Say that my .B3D file is named elevel9.b3d and within this .b3d file that I exported from gile[s] has another .b3d object that I imported during the building of this level called torch.b3d and I renamed it in the Basic Properties to torch1..
And then I export the scene as a .B3D file called elevel9.b3d... So.. after doing the export thingy from gile[s], How exactly do I search through this level file to find the object torch1 then? Did you use gile[s] to export your level in the Free FPS shell demo? And if you did like I think you was tell me above then, What export options did you select when you did your export then?!?

The .b3d file called torch.b3d that I imported into my level scene was named torch1 in the Basic Properties in gile[s]... So would it be to much trouble to ask of you a step by step procedure on how about to go about do this with my level? I would greatly appreciate your help with this very much so! Thank's very much for your assitance. :)


Yan(Posted 2004) [#4]
level = LoadAnimMesh("elevel9.b3d")

torch1 = FindChild(level, "torch1") ; The search string is case sensitive
I don't know what this finding the root node is all about. FindChild() is recursive, so it's not needed.


YAN


Kozmi(Posted 2004) [#5]
Thank's Yan!

That did the trick... :)
Very much appreciate it!


t3K|Mac(Posted 2005) [#6]
anyone having a working link for Free FPS shell!! demo?


Sir Gak(Posted 2005) [#7]
How do I delete a post I made in error (like, this one)?


WolRon(Posted 2005) [#8]
How do I delete a post I made in error (like, this one)?

Say something naughty...


Naughty Alien(Posted 2005) [#9]
..try this..

http://www.uploadraid.com/uploads/b520c2bd81.zip


t3K|Mac(Posted 2005) [#10]
thanks m8.