yes, if you see the video of my first post, i have the animation done to the killed enemy.
but still i having problems with remove , drop, or addtodeletionQueue
for now, when the enemy is dead, i set the position how i say at first time, far away. i know this is not the best way D: !!!
someone can make me a simple example, with remove a node ?
here the code that i'm trying, some basic to trying remove
Code: Select all
#ifdef _MSC_VER
#define _CRT_SECURE_NO_WARNINGS
#pragma comment(lib, "Irrlicht.lib")
#endif
#include <irrlicht.h>
#include "driverChoice.h"
using namespace irr;
int timing=500;
int main(){
video::E_DRIVER_TYPE driverType=driverChoiceConsole();
if (driverType==video::EDT_COUNT) return 1;
IrrlichtDevice* device = createDevice(driverType, core::dimension2d<u32>(640, 480), 16, false, false, false, 0);
video::IVideoDriver* driver = device->getVideoDriver();
scene::ISceneManager* smgr = device->getSceneManager();
scene::IAnimatedMeshSceneNode* cofre = smgr->addAnimatedMeshSceneNode(smgr->getMesh("../../media/enemy.ms3d"));
if (cofre) {
cofre->setMaterialFlag(video::EMF_LIGHTING, false);}
smgr->addCameraSceneNodeFPS();
while(device->run()){
driver->beginScene(true, true, video::SColor(255,255,0,0));
timing -= 1;
if (timing < 0){
cofre->remove();
}
smgr->drawAll();
driver->endScene();}
device->drop();
return 0;
}
but the programa crash !!!