Scripts / AI following another

Author
Message
spike314
12
Years of Service
User Offline
Joined: 31st Jan 2012
Location:
Posted: 9th May 2015 18:31
Is there anyway to make an AI character follow another AI character and get its current action. for example if AI_1 starts to run then AI_2 will also run?
PM
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 9th May 2015 18:59
yes kinda but you'll need these 2 functions which aren't in the global by default



then rotate and check the distance - if the lead soldier is too far then set the follower to run and if not set him to walk
life\'s one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
spike314
12
Years of Service
User Offline
Joined: 31st Jan 2012
Location:
Posted: 9th May 2015 19:19
cheers does that mean im going to need the ID of the Object and if so how do i go about getting that in script?
PM
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 9th May 2015 19:50
yep you're going to need some way to tell the script which object to rotate/compare to.

you lead guy will have a script running so just use something like

lead_guy = e

then in the second script replace 'v' when you call the functions above with 'lead_guy'

life\'s one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11

Login to post a reply

Server time is: 2024-12-22 01:39:34
Your offset time is: 2024-12-22 01:39:34