SA-MP Forums Archive
Check if object is facing another - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Check if object is facing another (/showthread.php?tid=484730)



Check if object is facing another - fordawinzz - 01.01.2014

Is there any function for that? For example: I want to check if the light (obj id 1893) is above (or "gives light" to) some other object, let's say a table(obj id 1433).


Re: Check if object is facing another - Voxel - 01.01.2014

No I dont think you can but you could try checking if the light is a valid object (IsValidObject) and then do the rest of your code.
https://sampwiki.blast.hk/wiki/IsValidObject
And maybe you can try to get the pos of the object and see if its near the other object.

Hope you can work it out! Good luck !


Re: Check if object is facing another - Konstantinos - 01.01.2014

https://sampwiki.blast.hk/wiki/GetObjectRot


Re: Check if object is facing another - fordawinzz - 01.01.2014

hmm, okay. didn't think about that. thanks konstantinos