To Know the position of a object
#1

Hi,

I have in my script:

GamemodeInit()

Object1 = Createobject(588,1000,1000,500); // just a example



I want to make a command, if the "Object1" move or is not in the position given in the GamaModeInit, so the command don't work with a return, "this object move". I use if (getobjectpos(Object1, 1000,1000,500) { command work} else if (getobjectpos(Object1, 1000,1000,600){ command work} ... but i have always a error ...so getobjectpos is not I think adapted for that.

Thanks help.
Reply
#2

Well it seems that the example is some kind of elevator since just the z changes from 500 to 600. Here's a script for only checking the z.

pawn Код:
new Float:z;
GetObjectPos(Object1,z,z,z);

if(z == 500)
{
    //Down
}
else
{
    //Up
}
Reply
#3

That is used like that. Thank man. Good year.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)