Object Problem

Blitz3D Forums/Blitz3D Beginners Area/Object Problem

wizzlefish(Posted 2004) [#1]
I've been trying to use "Object" to sort things out, but it isn't working.

What I've done is I've made a function called "InitLevel." This functions sets up the level and has no errors. But when "InitLevel" calls the function "InitLevelGuns," I recive an error "Entity does not exist."

I know the problem, but I just don't know how to fix it because this is the first time I've ever needed to use "Object."

I named all my guns using "EntityName," but I don't know how to utilize this. Please help.

This is the "InitLevelGuns" function:


Here is "UpdateGun," where the problem is:


The problem is where you switch guns - where all the "HideEntity"'s and "ShowEntity"'s are.

I need to convert those Hide and ShowEntities to Object, but I don't know how.

(Sorry this is such a long post - I hope I've made it thorough enough :P)


wizzlefish(Posted 2004) [#2]
Is it a problem with Globals?


JKP(Posted 2004) [#3]
Posting the same topic in two forums is a bad idea:

http://www.blitzbasic.com/Community/posts.php?topic=41777


wizzlefish(Posted 2004) [#4]
I posted here, waited a while, and didn't get an answer.