Jump to content

Home

Scripting Problems


ForeverNight

Recommended Posts

Yeah, I'm just full of questions right now, that and problems.

 

Well, I'm trying to build a mod (Obviously) and I'm running into a dead end with scripts. (Originally I was going to just use a giant .mod file) Well, using a series of scripts I was going to have a placeable spawn in the hideout when I entered it. (The name of it was k_ptar_m02af_en) and using the executescript command I would tell it to run the script that spawns the placeable and then run the normal OnEnter script. (Re-named to k_ptar_m02af_en2)

 

Well, I placed the scripts and placeable in the override folder and started up my game of KotOR. I would go through the last room in the Endar Spire and use the Pod.

 

The cutscene would run, then the dialog with Carth, then it would free me... and there is no footlocker where it should be. Sometimes, if I'm lucky, there will be just an invisible 'force field' type thing that won't let me run/walk where the footlocker should be.

 

The two scripts are below.

 

k_ptar_m02af_en

void main()

{

object oEntering = GetEnteringObject();

 

if (GetIsPC(oEntering))

{

 

ExecuteScript("spawn_mcache1", OBJECT_SELF);

 

}

 

ExecuteScript ("k_ptar_02af_en2", OBJECT_SELF);

}

 

spawn_mcache1

void main()

{

CreateObject( OBJECT_TYPE_PLACEABLE, "mc1", Location(Vector(86.64,140.41,0.00), 274.44));

}

 

Any help with what the problem is would be greatly appreciated.

Link to comment
Share on other sites

The co-ordinates should have spaces between them, try this;

 

void main() 
{ 
CreateObject(OBJECT_TYPE_PLACEABLE, "mc1", Location(Vector(86.64, 140.41, 0.00000), 0.0));
} 

When I first started modding I did use scripts to spawn items and creatures but have since found that more often than not it's best to edit the .git file directly.

 

 

--Stream

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...