News Box
WELCOME TO MLNO!!! ... ENJOY YOUR TIME HERE! ... WHILE YOU ARE HERE, CHECK OUT OUR RPGS!
My LEGO Nexus Organization
January 31, 2026, 03:04:22 pm
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Guests: Please register and look around! Tell your friends. Registration is instant, but you'll have to wait for an active admin to get online to approve your account, which should take less than 24 hours.  If you do not receive your approval email, just try to login. We are having issues with the automated email system.
 
  Home   Forum   Help Arcade Gallery Rules Staff List Login Register Chat  

Unity

Pages: [1]   Go Down
  Print  
Author Topic: Unity  (Read 1307 times)
0 Members and 9 Guests are viewing this topic.
KnightsFan
MLN Quester
Craftsman
*

MLNO Reputation 3
Offline Offline

Gender: Male
Awards:
Team: No Team
Posts: 1767




Badges: (View All)
Level 6 Tenth Year Anniversary Ninth Year Anniversary
« on: June 12, 2013, 10:54:43 am »

Mine are REALLY simple, so I don't recommend using it without some improvements Tongue

I put waypoints on the map, and then created an array with all their names, ordered by their position from left to right across the map. The AI checks if the player is to the left or right of them, and then follows the waypoints in that direction. If the AI has a line of sight with the player, then they just charge.
For following waypoints, the AI has a "lastNode" property, and then they move towards the next one in the array. (Or, if the player is to the left, the previous one in the array)

This only works with a relatively linear map since they only check for the player being left or right (for now). I'll add more parameters when my map becomes more complicated.
Report Spam   Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

LEGO® is a trademark of the LEGO Group, which does not sponsor, authorize or endorse this site.
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum

Powered by SMF | SMF © 2016, Simple Machines
Privacy Policy
Page created in 0.05 seconds with 11 queries.