Scripts / Possible to move an entity only of the player can see it?

Author
Message
Polaraul
GameGuru TGC Backer
10
Years of Service
User Offline
Joined: 30th Jan 2014
Location:
Posted: 30th Jan 2016 00:24
Not sure if this is possible in GameGuru, but I am trying to make a character move only when the player can see it. I can seem to get a character to move if it can see the player, but not the other way around? Is this even possible yet with GameGuru Lua (which I am very rusty on)
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 30th Jan 2016 09:26
Yes I have already written that script for someone else but basically you need to use something like my PlayerLooking function (found in my example scripts thread, links are in the first post) although it technically checks the reverse to what you want it will be fine if you remove the distance check from the function and check that separely.

Or if you can wait I will upload the file when I get back home in a few days.
life\'s one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, AMD R9 200 series , directx 11
Polaraul
GameGuru TGC Backer
10
Years of Service
User Offline
Joined: 30th Jan 2014
Location:
Posted: 30th Jan 2016 12:26
Many thanks for all your help smallg, it is much appreciated. I am away too for a few days, so I can wait for your script Many thanks once again
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 31st Jan 2016 13:00
i believe this is the working script
https://forum.game-guru.com/thread/207801?page=12#msg2539986
life\'s one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, AMD R9 200 series , directx 11

Login to post a reply

Server time is: 2024-05-03 06:29:40
Your offset time is: 2024-05-03 06:29:40