Message 1 of 3
illegal self-reference help please :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
ok so i want to write a little script so that if object A moves to far away from object B then object B will move closer which i thought would be simple so this is how i started.
I havent got past this, if I put this into a position script controller then I get an error saying "illegal self-reference" which I think I understand, its trying to refer to its own position while also trying to change it hence confusion but I cant think of how else to do it.
any advice would be very helpfull.
Thank you 🙂
a = $A.pos
b = $B.pos
if distance a b < 30 then
(
)
else
(
)
I havent got past this, if I put this into a position script controller then I get an error saying "illegal self-reference" which I think I understand, its trying to refer to its own position while also trying to change it hence confusion but I cant think of how else to do it.
any advice would be very helpfull.
Thank you 🙂