Sign in to follow this  
Atton Rand

My first project. Need some guidance

Recommended Posts

I want to spawn a Gamorrean in the Iziz Spaceport and want to talk to him. I'll do the script of the talking later. Thanks to zbyl2 and Fair Strides 2 (Lucasforums) for guiding me so far.

 

Okay so here are the final scripts:

 

1. gamspawn.nss:

void main()
{
vector Spawn;
Spawn.x = -23.47745f;
Spawn.y = 80.85285f;
Spawn.z = 12.74702f;
float a = 0.99720;
CreateObject(OBJECT_TYPE_CREATURE, "g_gammorean01", Location(Spawn,a));
}
 

 

2. gamespawn101.nss
 

 

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);
}
 

 

I got the precise coordinates with the help of the whereami armband. But I'm still unable to see the Gamorrean? All I did was placed the .ncs files of the above scripts in the override folder. What am I doing wrong? I'm using a save from the Iziz Spaceport to check the mod.

Share this post


Link to post
Share on other sites

I... don't think spawning works that way...

 

An example from k_003ebo_onenter.ncs;

object oHK50 = CreateObject(OBJECT_TYPE_CREATURE, "hk50cut",Location(Vector(59.10990,34.51765,1.80000),30.0f));

Share this post


Link to post
Share on other sites

gamespawn101.nss

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

if(GetIsPC(oEntering))
{

if ((!GetIsObjectValid(Gamtest)))
{
CreateObject(OBJECT_TYPE_CREATURE, "g_gammorean01",Location(Vector(-23.47745,80.85285,12.74702),0.99720f));
}
}
ExecuteScript("k_501_enter",OBJECT_SELF);
}
 
Suppose... something like this?

Share this post


Link to post
Share on other sites

What do I do once I have compiled the above script? Do I need a .utc file too? I got the coordinates with the help of the whereami armband. I'm unable to see the Gamorrean in the Iziz Spaceport. And can you explain what this line means:

 

 

 

ExecuteScript("k_501_enter",OBJECT_SELF);
 

I don't understand why we write OBJECT_SELF?


 

Share this post


Link to post
Share on other sites

I successfully spawned the Gamorrean. Now how do I make him initiate a conversation with me when I'm close to him? How do I edit my dialogue options and his responses?

Thanks for your help smilie.gif

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this