Hi!
Well im training with irrlicht, im creating the "enemy" right now, the IA, Input check, and here is where i have the problem...
Important Point: Im doing an Function enemy, like:
int Enemy()
And in there i call IAnimatedMeshSceneNode, to set the Mesh, but, i need a Loop, to check the Input, etc.
I tried doing:
while(device->run()), or while(true)
But it always get frozen. I need help with this! The question is how can i do to make a Input Check outside the Main Loop. Thanks!
Problems creating enemy Update
i think you should make the input thing without that loop.
if you do "while(device->run())" then it will never end.
so, it will freeze xD
i think you should do something like that
so if youre waiting for input, you set scene to 0, and if you inputted something, then set to 1, to use the inputted data, or something.
(i think menus works in the same way )
if you do "while(device->run())" then it will never end.
so, it will freeze xD
i think you should do something like that
Code: Select all
int scene = 0; // 0 = waiting for input, 1= others (game, or something)
while(device->run()) // main loop
{
Enemy();
if (scene ==0)
Enemy_Input();
else .... // or maybe you could do this with switch
//render things
}
(i think menus works in the same way )