Aller au contenu

Photo

The Octogong


  • Veuillez vous connecter pour répondre
3 réponses à ce sujet

#1
ffbj

ffbj
  • Members
  • 593 messages
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?

#2
Lightfoot8

Lightfoot8
  • Members
  • 2 535 messages
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.

#3
ffbj

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

#4
wyldhunt1

wyldhunt1
  • Members
  • 246 messages
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 .