Thread: [WIP] LDR's WIPs
View Single Post
Old 10-30-2010, 09:27 PM   #38
LDR
Your Death Angel
 
LDR's Avatar
 
Join Date: Apr 2010
Location: Malachor V
Posts: 1,130
Current Game: Halo 3
Helpful! Roleplayer Imperialist Meatbags Guild Member The Walking Carpets Guild Member 
I made my script but when I enter the module a second time, they spawn AGAIN, putting two instead of 1. When I warp there again, there will be three there where there should be one. I think it's looping. Somebody help?
Code:
void main()
{
  object oEntering = GetEnteringObject();
  object oPC=GetFirstPC();
  if (oEntering==oPC)
      {
      //check if the object is already there to avoid multiple objects
      if  (!GetIsObjectValid(GetObjectByTag("kor_czex1")))
            {
          //Note that the script uses OBJECT_TYPE_CREATURE instead of OBJECT_TYPE_PLACEABLE - that's the only difference with the container:
          CreateObject(OBJECT_TYPE_CREATURE, "kor_coff1", Location(Vector(10.47,8.82,63.72), 0.00));
          CreateObject(OBJECT_TYPE_CREATURE, "kor_coff2", Location(Vector(10.48,-2.28,63.72), 0.00));
          CreateObject(OBJECT_TYPE_CREATURE, "kor_coff3", Location(Vector(32.62,0.65,59.14), 0.00));
          CreateObject(OBJECT_TYPE_CREATURE, "kor_coff4", Location(Vector(32.65,6.00,59.14), 0.00));
          CreateObject(OBJECT_TYPE_CREATURE, "kor_sgrd1", Location(Vector(40.57,8.33,59.11), 0.00));
          CreateObject(OBJECT_TYPE_CREATURE, "kor_sgrd2", Location(Vector(40.92,4.77,59.11), 0.00));
          CreateObject(OBJECT_TYPE_CREATURE, "kor_cmer", Location(Vector(20.46,12.05,58.94), 0.00));
          CreateObject(OBJECT_TYPE_CREATURE, "kor_czex1", Location(Vector(19.21,6.88,58.97), 0.00));
          CreateObject(OBJECT_TYPE_CREATURE, "kor_czex2", Location(Vector(22.99,24.14,59.11), 0.00));
          CreateObject(OBJECT_TYPE_CREATURE, "kor_czex3", Location(Vector(41.07,0.63,59.32), 0.00));
            }

     //ExecuteScript("k33b_openacademy", OBJECT_SELF); 	
     }
}



Forgive, but never forget. No amount of DLC can take back lying to your fan base. Trust is earned, not downloaded.



My Mods
Current Mod Thread
LDR is offline   you may: quote & reply,