Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
19 June, 2013, 19:13:00 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: [1]   Go Down
  Print  
Author Topic: Fire Emblem style enemy AI help -  (Read 254 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
Yeong
Eternally Young Scarlet Moon
LV12 Extreme Poster (Next: 5000)
************
Offline Offline

Gender: Male
Last Login: Today at 00:24:25
Date Registered: 15 October, 2010, 04:29:49
Location: Arden, NC
Posts: 3705


Topic starter
Total Post Ratings: +260

View Profile
« on: 04 May, 2012, 04:59:46 »
0

In Fire Emblem, you know how the enemy attempts to get near you when you're near his attack range?
Can anyone get me a pseudocode of how to make that happen?
The map will be tilemap and players have the character code less than 50.
Logged

Project Redemption....

My project progresses:HERE
My Pastebin stuffs:HERE
Check your rate: HERE
My Animations: HERE
Spoiler for Images :D:

ノ◕ヮ◕)ノ:・゚ PENGUIN WAVE!!:„ø¤º°¨ ¨°º¤KEEP THE PENGUIN GOING ¸„ø¤º°¨ ¨°º¤øº LETS GO PENGUIN !¤¤º°¨¨°º¤øº¤ø„¸¸ø¤º°¨„ ø¤º°¨¨°º
squidgetx
Food.
Coder Of Tomorrow
LV10 31337 u53r (Next: 2000)
*
Offline Offline

Gender: Male
Last Login: Today at 17:53:05
Date Registered: 30 May, 2010, 19:54:18
Location: eating somewhere
Posts: 1849


Total Post Ratings: +480

View Profile
« Reply #1 on: 15 May, 2012, 04:28:35 »
0

I'm not familiar with Fire Emblem, but you could just loop through all the tiles surrounding the enemy to check if the player is there. If the player is within range, store the player's coordinates and use some basic algebra to figure out what direction to move towards. Hopefully this is somewhat helpful; if you could describe the movement style more I might be able to come up with something more specific
Logged

Read my webcomic! | My SoundCloud
Projects:

Check out the demo now!- Current progress: battle engine and stuff
Proud author of: Cuberunner | SpaceDash | The Psyche | XXEdit | AxeSynth | StickNinja | Gravity Guy | Embers:Phoenix | Zombie Gun
Axe: Need help optimizing?
User of Axe | zStart | TokenIDE | CalcGS | MirageOS
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 0.929 seconds with 30 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.