Corby |
Has anyone has a problem using move.obj.v for the ego? This has happened to me before... it's very strange... here's my code: if((said("talk","man") || said("talk","guru"))){ if(obj.in.box(o0,71,64,93,81)){ program.control(); prevent.input(); get.posn(o0,v100,v101); v100 = 72; move.obj.v(o0,v100,v101,1,f89); } else{ print("You are not close enough."); }} What am doing basically is telling my ego to move to a certain x coordinate while staying in the same y coordinate. What am I doing wrong? |
Andrew_Baker | Hint: Count your curly braces } |
sonneveld |
In AgiStudio, the help file and the compiler reckon it'smove.obj.v(oA,vX,vY,STEPSIZE,fDONEFLAG); It's actually move.obj.v(oA,vX,vY,vSTEPSIZE,fDONEFLAG); where stepsize is a variable. so try v150 = 1; notice how i used 150 as a parameter and not v150? That's because the compiler is expecting a number. It'll all work in the end though. Use any variable to store the stepsize.. v150 is just an example case. - Nick |
Corby | Oh!!! How simple! Step size is is a variable too! Thanks Nick! :) |