Author Topic: Anouther Topic- Spawn By Waypoint-  (Read 313 times)

Legacy_Omega27

  • Sr. Member
  • ****
  • Posts: 255
  • Karma: +0/-0
Anouther Topic- Spawn By Waypoint-
« on: December 10, 2011, 12:10:42 am »


                Ok i kinda need a "Spawn by waypoint For dummies" for this
Ive read many post for this but yet, i had no clue what the post was talking about once it got to variables.
Im still new at the who scripting thing. So help would be awsome on this one. 
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Anouther Topic- Spawn By Waypoint-
« Reply #1 on: December 10, 2011, 08:04:04 am »


               It sounds like what you need help on is NWN local variables. But your question is vague enough that it is hard to tell what you need help with. hopefully this will help.

I myself, think that the naming the varialbes,  set on an object by the SetLocal* functions,  can become confusing to a novice to NWN. The reason is that in a normal programming  any varaiable you use in a script is concidered a Local Varaiable. In NWN however when we talk about local variables, we are talking about a script accessable variable that has been placed on an object in the game via the SetLocal* functions.

Basicly any variable that you use in a script: ie.
int nVar1 = 100;
will be created when the script is ran and wil be gone once the script is finished running.

Variables that you set on an object via the SetLocal* functions: ie.
SetLocalInt( GetModule(),"nVar1", 100);
Will get created on that object, the first time the function is called. They will also not be destroyed untill the object, they are on, is destroyed or the DeleteLocal* function is called.
This allow you to create variables that can be accessed by more then one script.

I hope that helps.

EDIT:  Edited for readabilty.  I could not even understand what I wrote. 
               
               

               


                     Modifié par Lightfoot8, 16 décembre 2011 - 10:22 .
                     
                  


            

Legacy_Omega27

  • Sr. Member
  • ****
  • Posts: 255
  • Karma: +0/-0
Anouther Topic- Spawn By Waypoint-
« Reply #2 on: December 16, 2011, 07:50:41 pm »


               Sorry 1. for the late late reply got super busy.
2. Well i believe in truth i need help with the whole bases of Spawn By Way Point.
You know how you have to make a trigger and place the marker where you want the group to spawn etc.
Well what i want is to make just one trigger, and from that trigger have multiple monsters spawn in different parts of the area at the time the player steps/activate the trigger.