News Box
WELCOME TO MLNO!!! ... ENJOY YOUR TIME HERE! ... WHILE YOU ARE HERE, CHECK OUT OUR RPGS!
My LEGO Nexus Organization
February 01, 2026, 04:28:14 am
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to My Lego Nexus Organization! A LEGO Universe, LEGO and My LEGO Network Fan Site! The LEGO Company does not sponsor, authorize, or endorse this site.-- New? Check out the welcome forum and get started! Got questions? PM Blade, or one of the other active members of the staff.
 
  Home   Forum   Help Arcade Gallery Rules Staff List Login Register Chat  

Unity

Pages: [1]   Go Down
  Print  
Author Topic: Unity  (Read 1327 times)
0 Members and 103 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.051 seconds with 13 queries.