entity move probs
Displaying 1-7 of 7 total.
1
RageCage
|
-this is what I'd like to do:
////////////////////
if(mouse.l){
mouse.l=0;
if( findPath() ){
writePath(); //writes a new movescript to entPath
entityMove(testChr, entPath);
}
}
////////////////////
-But if I call entityMove right after the writePath, the entity warps and gets off set but still finishes the bare end of the move script.
a workaround I figured out is if I get rid of the entity move and add:
////////////////////
if(mouse.r){
mouse.r=0;
entityMove(testChr, entPath);
}
///////////////////
I'm not really sure why that happens... these statments are alone in a function being hookretraced.
Posted on 2004-05-18 02:27:48
|
vecna
|
I really have no idea wtf you're talking about. Is this having to do with you trying to queue movescripts?
Posted on 2004-05-18 20:05:31
|
RageCage
|
ok after more testing, I figured out what is happening. If entityMove is called after you havent done a render() for a while, then the entity warps ahead and looks screwy. if you call a render before entitymove it works fine. unfortunatly I'm in a retrace so its a bad idea to call render. I could make a work around if I had some way of telling if the entity is moving to the movescript currently or not.
Posted on 2004-05-18 23:16:43 (last edited on 2004-05-18 23:17:56)
|
vecna
|
A workaround would be to do SetEntitiesPaused(0) instead of Render before you call the movescript. That will reset verge's internal timer that keeps track of how many ticks entities should be processed for.
Posted on 2004-05-19 12:55:19
|
Gayo
|
By the way, does SetEntitiesPause(1) stop the controls from updating on their own when ShowPage is called? Because it seemed to for me.
Posted on 2004-05-20 02:58:19
|
resident
|
At a guess, no. But I'm guessing it will also stop the player's entity dead as well.
Posted on 2004-05-20 05:06:21
|
Gayo
|
I couldn't even Alt+X when I had it going until I put an UpdateControls in the renderstring.
Posted on 2004-05-20 08:59:43
|