c_move crash [SOLVED]

Posted By: AlexMP

c_move crash [SOLVED] - 11/13/09 22:19

Hi everyone!

I try to make a game in which the player must push boxes away in order to complete the level. So I added ACTIVATE_PUSH to the player movement and made a function for every box:
Code:
function boxmove(){
	if (event_type == EVENT_PUSH)
	{
		snd_play(tap,100,0); //play a sound
		c_move(me,vector(-30,0,60),NULL,NULL);
	}
}


If I don't use flags everything is fine, otherwise the engine crashes (after the sound is played). I get the message "acknex.exe has encountered a problem and needs to close".
What is wrong?
Thanks
Posted By: Progger

Re: c_move crash - 11/13/09 22:50

try to do a wait(1); after it (:
But im not sure
Posted By: DavidOC

Re: c_move crash - 11/13/09 23:39

I had the same error, the manual says you should not call c_move on triggered events, set a flag and then update the movement in the entity action.

Regards.
Posted By: AlexMP

Re: c_move crash - 11/14/09 10:19

Thanks DavidOC, it works.
© 2024 lite-C Forums