Jump to content

Home

Qui-Gon's Script Shack


Qui-Gon Glenn

Recommended Posts

Hmm. I've found ActionMoveToObject to be unreliable. ActionForceMoveToObject very rarely fails me, however. (Again, that's probably why it exists in the first place.)

// 383: Force the action subject to move to oMoveTo.
void ActionForceMoveToObject(object oMoveTo, int bRun=FALSE, float fRange=1.0f, float fTimeout=30.0f);

The variables are basically the same except there's a float at the end... I believe that's how long it will try before giving up.

Somehow, the selection GUI still didn't show up, after changing those trees to the simply command. Though, when I checked afterwards, the party member is recruited & able to be chosen for the player's current party. :confused:

Yeah, as I said I'd need to see the whole thing to be sure. It sounds like some other part of the script is interfering with this particular function.

Link to comment
Share on other sites

  • Replies 352
  • Created
  • Last Reply

Force usually teleports though.

 

Tried to have people leave the Nar Shaddaa cantina through the door, it's impossible.

Regular move just gets them stuck, force move instantly teleported them (since no good path).

Then again might have been the map since trying to make a NPC run to the middle of the cantina gave big problems too...

Link to comment
Share on other sites

Force usually teleports though.

 

Tried to have people leave the Nar Shaddaa cantina through the door, it's impossible.

Regular move just gets them stuck, force move instantly teleported them (since no good path).

Then again might have been the map since trying to make a NPC run to the middle of the cantina gave big problems too...

I've never had anything like this happen.

Hmm, well both ActionMoveToObject and ActionForceMoveToObject aren't working. In fact, it appears something's gotten really messed up. The character won't walk his waypoints and the perception event doesn't seem to be firing.

In that case, I'd say you probably made a typo at some point, and you should either start everything over from scratch or carefully check everything.

Link to comment
Share on other sites

  • 2 weeks later...

Okay, so I've been attempting to get this:

 

void main()
{

object oPM1 = GetPartyMemberByIndex(1);

ApplyEffectToObject(1, EffectMovementSpeedDecrease(99, oPM1, 18));

}

 

To compile for a while now, but I keep on getting two errors. 1: Too many arguments specified for EffectMovementSpeedDecrease 2: Required argument missing in ApplyEffectToObject.

 

Could someone explain to me what I've done wrong?

Link to comment
Share on other sites

  • 2 weeks later...

Alright, so I have come here to ask this:

 

If the PC were to have a conversation with a party member in which that party member were to share his/her past with the PC in flashback form (start a new module and have a fancy cutscene) would there be a way to check what module, and what coordinates in that module that the PC was at, before the flashback took place in order to warp the PC back to the right location after the flashback (cutscene) took place?

Link to comment
Share on other sites

There is - probably - but the question is how much effort you want to spend to do so. It can be done relatively easily in K2, by spawning a waypoint at the characters' positions and then moving them there when the module reloads... but I don't believe you can spawn waypoints in K1, at all. The only instance of something like this happening in K1 that I can remember is the Revan flashback; yes, the beginning is just a Bink video, but Revan taking his mask off is a proper cutscene module (side note: I believe they did this for people who disable Bink videos, so they would know what the hell was going on). But that scene starts as a cutscene, and so naturally the waypoints already exist. But I'm guessing you want something along the lines of Kreia's fall - so the conversation can happen anywhere, and placing waypoints ahead of time would be impossible.

 

But fear not! I have an alternative solution: invisible placeable. You should be able to spawn it in by normal means. I did something along these lines, though it didn't involve leaving the module - and of course I can't remember why I had to do it this way anymore. :rolleyes: I don't have access to my source scripts at the moment, but if memory serves, you need to do something like:

location L1 = Location(GetPosition(oNPC1), (GetFacing(oNPC1));

...and spawn the invisible object at that location, before you transit away. Then when you load the module again, just teleport the NPC to the placeable. Or for some reason if you have to spawn a new NPC, get the location of the placeable this time and spawning the NPC there.

 

Repeat as needed.

Link to comment
Share on other sites

Revan taking his mask off is a proper cutscene module (side note: I believe they did this for people who disable Bink videos, so they would know what the hell was going on).

Not really. They did it that way so when the mask goes off, the PC's face is revealed. Seeing the amount of faces a PC can choose, well, doing biks for all of them is a bit too much, no?

Link to comment
Share on other sites

Not really. They did it that way so when the mask goes off, the PC's face is revealed. Seeing the amount of faces a PC can choose, well, doing biks for all of them is a bit too much, no?

What? I don't follow you at all. Why would they make a Bink video for every face? Obviously they'd need to do that in the game... but that wasn't stricly necessary for the scene; it could have been done another way. What I meant is that someone who has disabled the Bink videos will only see this part. Anyway, this is all irrelevant.

Cool, but how would I take note of the module the PC was in before the cutscene so I could warp back to it?

Either a global as mentioned above, or if it's all in a single script you might not have to do even that.

Link to comment
Share on other sites

Well, if you disable movies, you're still going to be a bit lost. However, Kreia's fall and Visas' introduction were both originally in the game. I believe the scripts are set up to save your location and such already - at least it seemed that way when I glanced at them many moons ago - but obviously they decided to do a Bink video instead, likely to cut down on the loading time. There's still some of that nonsense with the Atris interludes.

Link to comment
Share on other sites

Just out of intrest how would you go about creating a script for endgame? You know, after the last k1 movie has played and you return to the main menu. This is my idea of how it would look (note that im the worst scripter holowan has known),

 

void main() 
{
StartNewModule("ENDGAME");
}
   }

Link to comment
Share on other sites

Just out of intrest how would you go about creating a script for endgame? You know, after the last k1 movie has played and you return to the main menu. This is my idea of how it would look (note that im the worst scripter holowan has known),

 

void main() 
{
StartNewModule("ENDGAME");
}
   }

 

Here's the code to return to the main menu:

    [color="#03C03C"]// NOTE: If you put EndGame(TRUE); or EndGame(1); or if you don't put a 
   // variable, it will default to displaying the death GUI. To not display 
   // the death GUI, you have to put EndGame(FALSE); or EndGame(0);[/color]
void main()
{
   EndGame(0);
}

Link to comment
Share on other sites

Whoa.

 

 

The Shack has been stickied?!???!1!!?

 

Very cool 8)

 

Glad to see that you folks have kept the lights on; between work and some personal/familial issues, I have had very limited and precious personal time, and have been unable to keep up with my friends (and responsibilities) here. For those of you with an unanswered PM, I will get to my inbox this weekend - my apologies for my absence!

 

Carry on, see you soon, and MTFBWYA!

Link to comment
Share on other sites

Ok,

 

Instead of just fixxing and compiling scripts, im gonna have a go at making them. Without looking at examples. (for the simple scripts)

Just need to know if these scripts ar correct if not why...

 

voidmain ()

{

CreateItemOnObject,("g_w_lghtsbr10," oPC) ;

}

 

Ive got a good feeling its wrong (my ktool has gone funny and I dont know how to compile with the other program).

Thanks for reading.

 

Changed it, is it right now?

Again, oPC is Pc ( I assume) so would that give the pc an lightsabre? Again, its my first script :p (I wanna learn useful, basic scripts ::))

Link to comment
Share on other sites

Archived

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


×
×
  • Create New...