Quick Question...

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Sachiel7
Posts: 21
Joined: Fri Dec 30, 2005 6:24 pm
Location: USA

Quick Question...

Post by Sachiel7 »

Hi all,
It's been a little while since I've used irrlicht, so I'm trying to get back into the mindset of it all. Anyways, stupid question here, but I'm trying to remove an IMeshSceneNode from the scene that is owned by a game object. Specifically, an ammo box. I'm working on a LAN/Internet based FPS, and on the client side, the ammo box is more of a graphical token than anything else. I have it play a pickup sound when taken, but I want the actual object dropped (delete cl_AmmoBox). This all works fine and dandy, but the actual box is still in the scene. I can't call node()->drop because it crashes the program. How can I clean up the scene contents of the object?
-=Sachiel7=-
ceyron
Posts: 63
Joined: Tue Mar 03, 2009 5:10 pm
Location: Bucuresti, România

Post by ceyron »

welcome back; you should use node->remove() to get rid of an object
Image
andres
Competition winner
Posts: 78
Joined: Tue Jul 08, 2008 5:18 pm
Location: Guarapuava/Brazil
Contact:

Post by andres »

i'm coding exactly this part of my game right now, the drop() method is only used when you create an object calling a method which starts with "create", for example:

Code: Select all

driver->createTexture(dimension2d<s32>(128, 128));
in other cases you use remove().
Prof. Andres Jessé Porfirio
Federal Technological University of Parana (UTFPR)
www.andresjesse.com
http://irrrpgbuilder.sourceforge.net

Image
Sachiel7
Posts: 21
Joined: Fri Dec 30, 2005 6:24 pm
Location: USA

Post by Sachiel7 »

*slaps forehead*
I knew it was something simple! Thanks for the quick responses guys. Yeah, I spent some time this summer working with XNA, still doing a few projects w/ it as well, but I'm working on this FPS for a school project.
-=Sachiel7=-
Post Reply