JCarter426 Posted March 21, 2012 Share Posted March 21, 2012 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. 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 More sharing options...
Hassat Hunter Posted March 21, 2012 Share Posted March 21, 2012 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 More sharing options...
Fallen Guardian Posted March 21, 2012 Share Posted March 21, 2012 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. Link to comment Share on other sites More sharing options...
JCarter426 Posted March 23, 2012 Share Posted March 23, 2012 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 More sharing options...
Fallen Guardian Posted April 3, 2012 Share Posted April 3, 2012 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 More sharing options...
JCarter426 Posted April 3, 2012 Share Posted April 3, 2012 Looks like you ended the parenthesis in the wrong place. void main() { object oPM1 = GetPartyMemberByIndex(1); ApplyEffectToObject(1, EffectMovementSpeedDecrease(99), oPM1, 18.0); } That should do it. Well, maybe. Link to comment Share on other sites More sharing options...
Fallen Guardian Posted April 3, 2012 Share Posted April 3, 2012 Alright, it compiles. I'll check back and tell if it works in-game. EDIT: It works, though a speed decrease of 99 is ridiculous, as they barely move at all. Making it EffectMovementSpeedDecrease(45) makes the usual waddle of the GetPartyMemberByIndexFunction Movement look normal. Link to comment Share on other sites More sharing options...
JCarter426 Posted April 3, 2012 Share Posted April 3, 2012 Nice! I've never actually tried that. Good to know it actually works, no more silly speed-walking. Link to comment Share on other sites More sharing options...
Fallen Guardian Posted April 17, 2012 Share Posted April 17, 2012 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 More sharing options...
JCarter426 Posted April 18, 2012 Share Posted April 18, 2012 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. 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 More sharing options...
Fallen Guardian Posted April 18, 2012 Share Posted April 18, 2012 Cool, but how would I take note of the module the PC was in before the cutscene so I could warp back to it? Link to comment Share on other sites More sharing options...
Hassat Hunter Posted April 18, 2012 Share Posted April 18, 2012 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 More sharing options...
Hassat Hunter Posted April 18, 2012 Share Posted April 18, 2012 From KOTOR2's k_align_movie.ncs; CreateObject(32, "g_lastlocal", GetLocation(GetFirstPC()), 0); SetGlobalString("K_LAST_MODULE", GetModuleName()); Link to comment Share on other sites More sharing options...
JCarter426 Posted April 18, 2012 Share Posted April 18, 2012 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 More sharing options...
Hassat Hunter Posted April 18, 2012 Share Posted April 18, 2012 How would they reveal Revan was the PC without actually showing the PC? Sure they could just use the .bik itself, but that scene would have lost so much without that ingame cutscene afterwards... Link to comment Share on other sites More sharing options...
JCarter426 Posted April 18, 2012 Share Posted April 18, 2012 I don't know, maybe my perspective is foggy since I already knew. But my thought was the combination of Bink and cutscene was necessary, because if you disable the Bink videos you would only see the cutscene. Link to comment Share on other sites More sharing options...
Hassat Hunter Posted April 18, 2012 Share Posted April 18, 2012 Wonder how that works with Kreia's Fall and Visas' Introduction in KOTOR2 (never turned off the movies). Of course with TLSRCM the second one is ingame, but the first still is only a cutscene... Link to comment Share on other sites More sharing options...
JCarter426 Posted April 19, 2012 Share Posted April 19, 2012 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 More sharing options...
UltimateHK47 Posted April 19, 2012 Share Posted April 19, 2012 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 More sharing options...
Ferc Kast Posted April 19, 2012 Share Posted April 19, 2012 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 More sharing options...
UltimateHK47 Posted April 19, 2012 Share Posted April 19, 2012 Ahh, cheers Ferc, what was I thinking :/ Link to comment Share on other sites More sharing options...
Qui-Gon Glenn Posted April 20, 2012 Author Share Posted April 20, 2012 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 More sharing options...
UltimateHK47 Posted April 23, 2012 Share Posted April 23, 2012 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 (I wanna learn useful, basic scripts :) Link to comment Share on other sites More sharing options...
Hassat Hunter Posted April 24, 2012 Share Posted April 24, 2012 You haven't specified an object which should get that item... Link to comment Share on other sites More sharing options...
UltimateHK47 Posted April 25, 2012 Share Posted April 25, 2012 How about now? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.