binding NPCs to other NPCs
ok this is kinda difficult to explain, but i'll do the best I can. basically i'm wanting to know, how do you take 1 NPC, and bind them to another NPC, like they are in thier own grp? kinda like NPC A is group leader, NPC B will follow him around, and protect him LIKE a pet, but I don't want the randomized names. this is for a quest.
|
I suppose you could give the "pets" or "minions" npcs a follow order, and make a script which would automatically put them on agro list of each other with signals.
some examples here: http://www.eqemulator.net/forums/sho...ghlight=follow |
yea thats how I have them right now, infact thats the post I used to get it started hehe, but they bunch up behind the main NPC, and it just looks crappy. I was hoping to find something along the lines of how i've seen orcs in live a while back, walking in formation together.
|
too bad we don't have eq2 style "npc packs"
but walking in formation most likely achieved by giving those npcs very precise walking grids. But those grids do not hold for very long - with slightest interruption- like momentary agro - their perfect walk pattern will be broken. You could do it very tricky way, where you continuously check along the walk grid that all npcs are at appropriate position before continuing to the next grid point, and tell them to stop and wait if necessary, while others catch up. |
one of the ways i'm tryin to see will work, is during each EVENT_WAYPOINT the main NPC will signal to each minion, and the minion will check itself in relation to its position to the main NPC and readjust. but i'm still learning the perl functions, so still difficult for me.
something along the lines of NPC A signals NPC B. NPC B checks NPC A's $x,$y then checks its own $x,$y. and if they aren't at $x,$y+10, then moveto $x,$y+10. but I can't figure out how to find NPC A's coords with NPC B. |
Code:
if($signal == 5){ |
I redid it, cause after looking at it, it didn't look right to me. noticed a few errors.
Code:
if($signal == 5){ |
I'd do something like this. But of course tweak to your liking.
Actually, I think all you would need is: Code:
if($signal == 5){ Code:
#Shin: Added pet support to Vindi |
i'm looking to make a formation, because I have 5 NPC's that will be following 1, and follow bunches them all up behind him, and looks crappy. thats why i'm wanting to have them around the NPC and update thier position based on the main NPC moving. i'm just having trouble finding the main NPC's loc, and updating it to its "minions" so they can update thier position.
|
Try calling GetX and GetY on the mob returned by GetMobByNPCTypeID instead of on the ID returned by GetID.
Code:
my $revoltldrID = 189490; |
Code:
if($signal == 5){ |
MoveTo not moveto (yes they're case sensitive).
|
ok i'm done for the night, i'm gonna post what I got, and how its working, maybe someone can tell what i'm doin wrong.
NPC A Code:
if($signal == 12) { NPC B part 1 Code:
if($signal == 5){ NPC B part 2 Code:
if($signal == 11) { all globals are defined, and everything starts up, NPC moves one time, to first coords it finds when inital script is started. then nothing. npc just stands there. I really hope someone can help me figure this out. thanks :confused: |
Just glanced at it, but it may just be improper capitalization on the GetHeading method.
|
I would agree.
|
All times are GMT -4. The time now is 08:10 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.