View Single Post
Old 03-31-2013, 02:04 AM   #16
Fair Strides 2
Junior Member
 
Fair Strides 2's Avatar
 
Join Date: Jan 2012
Location: Oregon, United States
Posts: 495
Current Game: Master of Orion 2
Helpful! 
Quote:
Originally Posted by arsenalforever View Post
I showed zbyl2 your script and this is what he had to say:



Here is a list of the scripts I have currently (I'll make the conversation scripts later. I just want to see if the Gammorean is spawning correctly):

1. Gamspawn101.nss

Code:
void main()
{
object oEntering = GetEnteringObject();
object Gamtest = GetObjectByTag("g_gammorean01");

if(GetIsPC(oEntering))
{

if(GetIsObjectValid(Gamtest)==FALSE)
{
ExecuteScript("gamspawn",OBJECT_SELF);
}
}
ExecuteScript("k_501_enter",OBJECT_SELF);
}
2. gamspawn.nss:

Code:
void main()
{
        vector Spawn; 
        Spawn.x = 24.0;   
        Spawn.y = 34.0;   
        Spawn.z = 65.0;   
        
CreateObject(OBJECT_TYPE_CREATURE, "g_gammorean01", Location(Spawn,0.0));
ExecuteScript("k_501_enter", OBJECT_SELF);
}
The OnEnter value for Iziz Airport was k_501_enter but why do I need to execute k_501_enter at the end of both the scripts?
Are the above two scripts enough for me to be able to see the Gammorean in the Iziz Spaceport?

Thanks.
That ExecuteScript() part in the second one isn't necessary, sorry about that.

Those two scripts should be enough, but there are two things to point out:

1. Each of the numbers for the spawn vector and the float in the location have to have an "f" on the end, like "0.0f". Otherwise the compiler might throw an error, and the game might not execute it correctly.

2. Did you get the coordinates from the game, or are these a guess?


P.S: As to zybl2's comment, I don't have a problem with it. I was going to tell you about the triggers, but you were focused on testing it in-game and the triggers aren't one of the gff file types I'm particularly familiar with...


Always remember modders: "Quality= Effort*Time"

Quote:
Originally Posted by Jae Onasi
Hi! I messaged him on Facebook and got this answer: "Sure if he wants to release a new KSE, no problem. I'm surprised he was able to find all the perl modules. I released them a long time ago but they were buried somewhere in the KSE thread." So, go for it--please give him credit for the original work, though!
KSE 3.3.4 is LIVE!!! Check it out here.

12/13/13 -- Fixed KSE 3.3.4 bugs. Please check the above link.
Fair Strides 2 is offline   you may: quote & reply,