PDA

View Full Version : Why can't I get this to spawn?


Darth Cryptic
04-04-2009, 08:19 PM
I'm a first time scripter, so thanks to who ever helps me here ahead of time.

I've managed to get the following script compiled, but I can't get the monument to spawn. I want it to appear in the left hand small room right before you get to the Evil Kiria vision.

Is there something I'm missing, like a trigger or should I be using a different set of scripts entirely for what i want to do?


void main()
{
float x=56.25f;
float y=4.07f;
float z=9.88f;
float r=0.0f;
vector MyVec=Vector(x,y,z);
location MyLoc=Location(MyVec,0.0);
object osithmonument=CreateObject(OBJECT_TYPE_PLACEABLE,"sithmonument05",MyLoc);

CreateItemOnObject("g_i_lan1", osithmonument);
CreateItemOnObject("w_rocket_m", osithmonument, 10);
}

Star Admiral
04-04-2009, 09:57 PM
Code looks fine to me. What are you using to trigger the script? A conversation? Or do you want the monument to be spawned as soon as you enter the room?

- Star Admiral

Darth Cryptic
04-04-2009, 11:43 PM
Soon as i enter the room would be my preferred method, or spawned when I unlock the nearest door.

Star Admiral
04-05-2009, 01:44 PM
You can spawn it after unlocking the nearest door by putting the script into the OnOpen field of the door. Locate the door that you are using with KT, open the .utd file and click the Scripts tab. Type the name of your compiled script into the OnOpen field and save the file into your Override folder.

- Star Admiral

Darth Cryptic
04-05-2009, 10:59 PM
Ok, I checked out the door like you suggested, and there's already something in the OnOpen slot:

tr_pc_god


Now can I add another script trigger, is this junk code I can remove, or what?

Star Admiral
04-06-2009, 01:47 AM
void main() {
float x=56.25f;
float y=4.07f;
float z=9.88f;
float r=0.0f;
vector MyVec=Vector(x,y,z);
location MyLoc=Location(MyVec,0.0);
object osithmonument=CreateObject(OBJECT_TYPE_PLACEABLE,"sithmonument05",MyLoc);

CreateItemOnObject("g_i_lan1", osithmonument);
CreateItemOnObject("w_rocket_m", osithmonument, 10);
ExecuteScript("tr_pc_god", OBJECT_SELF);
}

Try this script version. Compile it and replace the tr_pc_god script with whatever you call this script.

- Star Admiral

Darth Cryptic
04-06-2009, 03:04 PM
It's spawning now. Sort of. It's currently invisible for some reason.

I had managed to get it to spawn as rubble after fixing a mistype between the script and the utp name/information. Now it's indivisible and not showing the "hey something's here" blue circle like it had as rubble.

Star Admiral
04-06-2009, 05:14 PM
But is it actually there? As in, you try to walk over it, and it blocks your path?

- Star Admiral

Darth Cryptic
04-06-2009, 06:10 PM
Yeah it's there, walked right into it.
Cleaned up the utp a little more and I can now get the "use saber, security, blow it up" indicator, but the monument itself is still invisible.

Saber and blowing it up works at opening it, but the security/use tunnerler seem to be set way high so I couldn't get it open that way.

Darth Cryptic
04-11-2009, 04:57 PM
I made an adjustment to where my monument is supposed to appear, and I'm getting nothing now. No resistance where it's supposed to be, just a blue bar that when you click it it says Locked. No saber/Security/Blow it up option any more.

Here are images if what's happening:

http://i101.photobucket.com/albums/m65/redcryptic/K200.jpg
http://i101.photobucket.com/albums/m65/redcryptic/K201.jpg
http://i101.photobucket.com/albums/m65/redcryptic/K202.jpg


and an image if what i want spawning. This was one spawned in the Jedi Temple mod:
http://i101.photobucket.com/albums/m65/redcryptic/K203.jpg

And apparently I don't know how to work the Spoiler feature.