Phredreeke, your Menu system didn't work either. Thanks anyways. All i want to know is how I can get the enemies to pursue Link. Im running off of TGF, so it's not too easy. (for me anyways). I've been programming for several years, prolly 4. I can do it, but im not a problem solver. So i need help once in a while.
Look in direction= position of link 0,0
movement start
that should send him on links trail (i hope....)
@jay.. i just bought the minish cap on the GBA and its good stuff, what do you think of capcoms attempt?. i personaly think the GFX are better than that of nintendos original.
The only problem is the TGF's ball motion is 8-dir. only, so If the Deku(or w/e enemy) is persuing him, he might go diagnol.
I bought Minish cap, and I loved it for 3 days. Then I beat it. Personnally I think the original is better, but thats because I think originals are unbeatable. I thought it was kind of cool that they attempted to redo the graphics or windwaker in 2D tho. Pretty cool stuff.
Alright, this is going to be a little fiddly in TGF.
The original LoZ movement, as I recall, has the enemies meandering around aimlessly for a while till they spot you, then chasing after.
I was going to go pretty in-depth here, but I just thought of something easier. Anyway, the movement:
Value A of an enemy is its direction, value B determines for how long it gives chase.
Value A(Enemy) = 0
Value B(Enemy) = 0
--Enemy: Set X position to X(Enemy)+1
Value A(Enemy) = 1
Value B(Enemy) = 0
--Enemy: Set Y position to Y(Enemy)-1
Value A(Enemy) = 2
Value B(Enemy) = 0
--Enemy: Set X position to X(Enemy)-1
Value A(Enemy) = 3
Value B(Enemy) = 0
--Enemy: Set Y position to Y(Enemy)+1
Value B(Enemy) = 0
Enemy is NOT overlapping a backdrop
Every 0"2' [or whatever]
--Enemy: Set value A to random(4)
At this point it'll wander around randomly. The following events handle background collisions:
Value A(Enemy) = 0
Enemy is overlapping a backdrop
--Enemy: Set X position to X(Enemy)-2
Value A(Enemy) = 1
Enemy is overlapping a backdrop
--Enemy: Set Y position to Y(Enemy)+2
Value A(Enemy) = 2
Enemy is overlapping a backdrop
--Enemy: Set X position to X(Enemy)+2
Value A(Enemy) = 3
Enemy is overlapping a backdrop
--Enemy: Set Y position to Y(Enemy)-2
Just pops him backwards out of a wall. The following spots if the Player is in front, so it'll run faster.
Value A(Enemy) = 0
Player X > Enemy X
Player Y > Enemy Y - 20 [or whatever]
Player Y < Enemy Y + 20
--Enemy: Set Value B to 20 [or whatever]
Value A(Enemy) = 1
Player Y < Enemy Y
Player X > Enemy X - 20
Player X < Enemy X + 20
--Enemy: Set Value B to 20
Value A(Enemy) = 2
Player X < Enemy X
Player Y > Enemy Y - 20
Player Y < Enemy Y + 20
--Enemy: Set Value B to 20
Value A(Enemy) = 3
Player Y > Enemy Y
Player X > Enemy X - 20
Player X < Enemy X + 20
--Enemy: Set Value B to 20
And then the original movement, speeded up:
Value A(Enemy) = 0
Value B(Enemy) > 0
--Enemy: Set X position to X(Enemy)+2
Value A(Enemy) = 1
Value B(Enemy) > 0
--Enemy: Set Y position to Y(Enemy)-2
Value A(Enemy) = 2
Value B(Enemy) > 0
--Enemy: Set X position to X(Enemy)-2
Value A(Enemy) = 3
Value B(Enemy) > 0
--Enemy: Set Y position to Y(Enemy)+2
Value B(Enemy) > 0
--Enemy: Subtract 1 from value B
Thats fairly simplistic but it should be fairly close to the LoZ AI given that they can only move in 4 directions. It doesn't take line of sight into account but I don't think the NES game did anyway.
Oh, well my noob-ish way was to make an invisible ball-movement object that follows Link all the time but really slowly, slowly enough to stay behind a good bit. Then make line-of-sight for enemy, when he sees player, he starts following or "looking at 0,0"(coordinates from ball)the ball, and when he collides with the ball-movement object, he looks at 0,0 of player and follows him, if enemy cant reach player within a certain time limit(have a counter with max of like 80 counting down by 1 every 0:05), then have enemy look at/"follow" the invisible ball-movement object again, until enemy catches Link/player, or until Link/player exits the area. Well, help me out if im wrong, or just dumb.
Nice Radix, yours make a little more sense than mine, .