Marching In Formations
I remember reading a while back that people hadn't been able to get a few mobs to march in formation. Going to post a bit of code that you can tinker with to your own liking.
For mine, I have one mob in zone called Strike Commander, here is the code for him. Code:
sub EVENT_SPAWN { Code:
sub EVENT_SIGNAL { If anyone feels like cleaning this up, please do. It is quite messy and inelegant, but gets the job done for what I wanted it to. I would much rather have them follow the commander out, or lead him out, but I could not for the life of me get that to work. |
This gave me some very good ideas. Thank you for your submission! :)
|
Heh, yeah I already had this in mind to mess with. This just does some of the work for me although I will be tweaking it a ton. Except for I had an ideal for an epic scene.
Thanks! |
I actually use a different method of formation, and I will show how one of my mini-events are done. I choose to use quest::moveto instead of the more complex ways of doing it, because I have noticed that a lot of formations tend to group up together which just looks crappy. They start out nice and smooth, but later end up all together or out of formation...
Here his how I do a little event in Old Commands, on my server. (The text and quests stuff has been removed, this only shows how the pathing works.) a rescue soldier leader: Code:
my $sx = undef; #spawn location x (NPCID) 952.pl & 954.pl Code:
my $sx = undef; #spawn location x Code:
sub EVENT_DEATH { How this works, is that when the players are on the quest (and the event can only be triggered if the player is on the quest) their task is to kill 15 dervish. As you can see, each time they kill one - it sends a signal that is counted. On count X the NPCs will walk to a closer location (in formation). This is only a 3 NPC formation, but can be applied in as many numbers as you would like. I find this method much more simple than the other methods that are out there. Enjoy! |
All times are GMT -4. The time now is 12:12 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.