JCarter426 Posted February 3, 2012 Posted February 3, 2012 You can do the same with object 2. Your subroutine already returns an object, so it's redundant.
UltimateHK47 Posted March 2, 2012 Posted March 2, 2012 void main () { if(GetModuleName == "ebo_m12aa") { CreateObject(OBJECT_TYPE_PLACEABLE, "object resref", location vector, FALSE); Location(x, y, z), xorientation, yorientation } } coordinates are 53.23, 60.37 and 1.80 (x,y,z in order) I kind user gave me this script, and I was wondering if this would work if I wanted to: See if I was on the Ebon Hawk and if yes spawn the tur_arc (res ref) At the space specified by the coordinates. Could you help?What needs to be done?
darth-ackbar Posted March 2, 2012 Posted March 2, 2012 just to clarify, the script I gave DJW, with the values he's just posted, would be: void main () { if(GetModuleName == "ebo_m12aa") { CreateObject(OBJECT_TYPE_PLACEABLE, "tur_arc", Location(53.23, 60.37, 1.80), xorientation, yorientation, FALSE); } } I know for a fact that it's wrong, but I wasn't sure how to make it right. Sorry about that DJW
Qui-Don Jorn Posted March 2, 2012 Posted March 2, 2012 maybe something more like... void main() { if ((GetModuleName() == "ebo_m12aa")) { CreateObject(64, "tur_arc", Location(Vector(53.23, 60.37, 1.80), xx.x, FALSE)); } } ...or somesuch..
darth-ackbar Posted March 3, 2012 Posted March 3, 2012 I think you've pretty much got it there Kuai-Donn, maybe: void main() { if ((GetModuleName() == "ebo_m12aa")) { CreateObject(64, "tur_arc", Location(Vector(53.23, 60.37, 1.80), xx.x, yy.y) FALSE); } } Id give that a go DJW, see what happens. Also, if your doing this for K1, I seem to remember that the whereami cheat doesn't give orientation values. I'm not sure how you would get them but for now just put 0 in each, sort it out later
UltimateHK47 Posted March 3, 2012 Posted March 3, 2012 Erm it sais syntax error at "False" when trying to compile void main() { if ((GetModuleName() == "ebo_m12aa")) { CreateObject(64, "tur_arc", Location(Vector(53.23, 60.37, 1.80), 0.0, 0.0) FALSE); } }
darth-ackbar Posted March 3, 2012 Posted March 3, 2012 You need to put a comma between the location and FALSE. So it would be: CreateObject(64, "tur_arc", Location(Vector(x, y, z), x, y), FALSE);
UltimateHK47 Posted March 3, 2012 Posted March 3, 2012 void main() { if ((GetModuleName() == "ebo_m12aa")) { CreateObject(64, "tur_arc", Location(Vector(53.23, 60.37, 1.80), 0.0, 0.0), FALSE); } } It now sais too many arguments specified in cell "location" And required argument missing in cell "CreateObject" What do I do? (Do I need OBJECT_TYPE_PLACEABLE inserted somewhere?
Hassat Hunter Posted March 3, 2012 Posted March 3, 2012 First of all, not sure why there are 2 ( at GetModuleName... reason? 1 should suffice. Your current issue is due an incorrect ) icon. The one after 0.0 should go beyond 1.80 too (so 2 there). Does it work now?
Qui-Don Jorn Posted March 3, 2012 Posted March 3, 2012 void main() { if ((GetModuleName() == "ebo_m12aa")) { CreateObject(64, "tur_arc", Location(Vector(53.23, 60.37, 1.80), 0.0, 0.0), FALSE); } } It now sais too many arguments specified in cell "location" And required argument missing in cell "CreateObject" What do I do? (Do I need OBJECT_TYPE_PLACEABLE inserted somewhere? No, you just need to close twice after FALSE and not the vector.. oh wait...reading that wrong.. (edit 1 I dont know I bow out..) Edit again)...no I stand by that actually...and you dont even need the FALSE anyway. tell me if Im wrong. Hassat, the reason I put two (( in now is because when I complied scripts with one, then decomplied the same script, it was putting two there anyway, and it never gave me any problems..
UltimateHK47 Posted March 4, 2012 Posted March 4, 2012 I'm a little embaresed but for some reason (maybe because I've just woken up) and I'm getting a little confused so could anyone go through the changes I need to do. Or even better, and example script. But thanks for helping me so far, -DJW EDIT: It sais tur_arc1.nss(2) syntax error at ")" With this script. Am I on the right tracks? void main() { if (GetModuleName() == "ebo_m12aa")) { CreateObject(64, "tur_arc", Location(Vector(53.23, 60.37, 1.80, 0.0, 0.0), FALSE)); } }
Qui-Don Jorn Posted March 4, 2012 Posted March 4, 2012 try this.. void main() { if (GetModuleName() == "ebo_m12aa") { CreateObject(64, "tur_arc", Location(Vector(53.23, 60.37, 1.80), 0.00, 0.00)); } } see if that works..
UltimateHK47 Posted March 4, 2012 Posted March 4, 2012 try this.. void main() { if (GetModuleName() == "ebo_m12aa") { CreateObject(64, "tur_arc", Location(Vector(53.23, 60.37, 1.80), 0.00, 0.00)); } } see if that works.. The script sais Required argument missing in call to "CreateObject" and To many arguments specified in call to "Location" What should I do? Thanks for the help so far -DJW
Qui-Don Jorn Posted March 4, 2012 Posted March 4, 2012 void main() { if (GetModuleName() == "ebo_m12aa") { CreateObject(64, "tur_arc", Location(Vector(53.23, 60.37, 1.80), 0.0)); } } This compiled the *first time* I tried it. It should work, my mistake was putting x and y after the vector
UltimateHK47 Posted March 4, 2012 Posted March 4, 2012 void main() { if (GetModuleName() == "ebo_m12aa") { CreateObject(64, "tur_arc", Location(Vector(53.23, 60.37, 1.80), 0.0)); } } This compiled the *first time* I tried it. It should work, my mistake was putting x and y after the vector Yay it compiled. Thanks so much! You'll be credited. As well as everyone else who helped. Time to test- Ill post how it goes later Cheers again -DJW
darth-ackbar Posted March 4, 2012 Posted March 4, 2012 Yeah I was going to post that earlier but I had to go out Well done everybody and I'm looking forward to your mod DJW
UltimateHK47 Posted March 4, 2012 Posted March 4, 2012 Another question, can you set, like for the caretaker, a script which tells the game a line of dialog has already been said, so you can't repeat that particular line. And vice versa, so it sais it hasn't said that line, so it's available.
darth-ackbar Posted March 4, 2012 Posted March 4, 2012 To do this, you need to set a boolean which will return true when you've talked to the character. Then create a conditional script for the line of dialog you want available after you've talked. This script will set the boolean, void main () { SetLocalBoolean(HAS_TALKED,0,TRUE); } This script will check to see if you've talked yet, int StartingConditional() { int nTalked = GetLocalBoolean(HAS_TALKED,0); return nTalked; } In the dialog file, put the dialog node you want the character to say AFTER you've talked before at the top. Then, in the conditional field, put the name of the second script. In the node of dialog you want the character to say the first time you talk, you need to put the first script in the script field. You can put it on any line of dialog but you need to decide where it would be best suited. Depending on the situation, you can make this as complicated or simple as you want, with many different conditional scripts.
UltimateHK47 Posted March 4, 2012 Posted March 4, 2012 So let me get this straight. The boolean script goes with the node my pc can only say once and the first time they speak. IE. to spawn something The conditional script goes with 2nd line so i cant spawn it again?
UltimateHK47 Posted March 4, 2012 Posted March 4, 2012 Thought I'd add it dosn't compile. It sasis: Undeclared Indentifier "HAS_TALKED: And Required Argument missing in call to "SetLocalBoolean" Here is the script: void main () { SetLocalBoolean(HAS_TALKED,0,TRUE); } Same errors with the second script: int StartingConditional() { int nTalked = GetLocalBoolean(HAS_TALKED,0); return nTalked; }
Fallen Guardian Posted March 4, 2012 Posted March 4, 2012 If you want to have a check wether the person has been talked to just use in-game resources. k_con_talkedto checks if you've talked to a person, and k_act_talktrue makes it so that the game recognizes that you've talked to the person, basically this: void main () { SetLocalBoolean(HAS_TALKED,0,TRUE); } Anyway, I use that a lot in KotOR 1, I don't know if it works in KotOR 2.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.