Scripts / Getting an AI character to Trigger a zone

Author
Message
Saintyboy
8
Years of Service
User Offline
Joined: 18th Jun 2015
Playing:
Posted: 12th Oct 2015 00:25
We use
if g_Entity[e]['plrinzone']==1 then...

for the player to trigger a zone but does anyone know if there is a way for an AI entity to trigger a zone when it enters it?
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 12th Oct 2015 11:57
not for zones but you can detect if an object (including AI) is close to another object
life\'s one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, AMD R9 200 series , directx 11
Saintyboy
8
Years of Service
User Offline
Joined: 18th Jun 2015
Playing:
Posted: 12th Oct 2015 16:57
Thanks Smallg - I think you gave me a similar answer to another thread of mine - - I really need it for a square area rather than a distance which would give me a circular check - but beggars cant be choosers I guess! Just a shame that the zones wont work for the AI - was hoping for an ai trigger function of somesort.
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 12th Oct 2015 17:23
well if you know the area then just check his coords are within the "area"
you can always set 4 (or more) objects to act as a square if you really want them to be movable in the editor too
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-05 02:10:59
Your offset time is: 2024-05-05 02:10:59