Author Topic: The Octogong  (Read 318 times)

Legacy_ffbj

  • Hero Member
  • *****
  • Posts: 1097
  • Karma: +0/-0
The Octogong
« on: December 18, 2011, 03:25:21 am »


               I was thinking of a training area where I have eight gongs, called The Octagong, an octagonal reference to an old Chuch Norris film.  So anyway npc's go to a specific wp and attack a specific gong which rings.  I have the gong targets woeking just fine, but I was wondering how others might approach it.  Currently I think each npc will have a variable set gong1, gong2, etc... then the wp's would be gong1, gong 2, and so too would the gongs, just stipulating a placeable there. Then when npc 1 spawns they go to wp tagged gong1, and attack gong1.  Seems simple enough.
Probably half the available gongs would be left open though that could vary by variying the numbers of npc's spawned
Any thoughts?
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
The Octogong
« Reply #1 on: December 18, 2011, 05:29:25 am »


               I see no problem with it.  However I do not see the need for the waypoint to attack from.   I would just move the NPC to the location right in front of the gong and attack frm there.
               
               

               
            

Legacy_ffbj

  • Hero Member
  • *****
  • Posts: 1097
  • Karma: +0/-0
The Octogong
« Reply #2 on: December 18, 2011, 08:38:27 pm »


               Thanks.  Yeah, they are throwing axes from a distance that's why. Sort of like everyone will have their own bowling lane.
               
               

               
            

Legacy_wyldhunt1

  • Sr. Member
  • ****
  • Posts: 443
  • Karma: +0/-0
The Octogong
« Reply #3 on: December 18, 2011, 10:00:10 pm »


               If you use x0_i0_position, you could do something like this.

       
#include "x0_i0_position"
void main()
{   
   object oGong = GetObjectByTag("Gong1");
   object oGongBanger = GetObjectByTag("FirstSpawn");
   float fDir = GetFacing(oGong) - 180.0;
   location lTarget = GenerateNewLocation(oGong, DISTANCE_MEDIUM, fDir, fDir);   
   MoveToNewLocation(lTarget, oGongBanger);
}


Note that my code may need to be tweaked a bit. I just copy/pasta'd from one of my scripts that does something a bit different.
               
               

               


                     Modifié par wyldhunt1, 18 décembre 2011 - 10:06 .