Darth Xander Posted January 25, 2008 Share Posted January 25, 2008 Hi guys, I am in the process of making my insulting computer panel for K1 and I need some scripts but I'll leave the rest until later, what I need is a script that makes the panel explode and dissapear. Edit: I have gotten to the scripting stage, what i need is: A script that initiates the dialog and a script that transforms the pc into a Gizka for 30 seconds. Thanks in advance ~DX Link to comment Share on other sites More sharing options...
Stream Posted January 26, 2008 Share Posted January 26, 2008 To destroy the panel you'll need this script; void main() { ActionDoCommand(DestroyObject(GetObjectByTag("[b]PANEL_TAG[/b]", 0), 1.0, 1, 0.0, 0)); } If you enter the name of the dialog file into conversation field of the .utp, it will start when the PC selects it, you don't need a script to start the dialog unless you want it to happen automatically in which case you'll also need a trigger. This script will make the PC look like a Gizka, although this is a permanent effect, I'm not sure how to make it last only 30 seconds but it will give you something to go by. void main () { object oPC = GetFirstPC(); ApplyEffectToObject(0, EffectDisguise(69), oPC); } --Stream Link to comment Share on other sites More sharing options...
Darth Xander Posted January 26, 2008 Author Share Posted January 26, 2008 Ok the Gizka scritp works and the other one didn't but thats ok bos DDD kindly made me a new one. I also need a script that turns the pc back into whatever he/she looked like before; or a script that reverses the gizka tranformation. Link to comment Share on other sites More sharing options...
sekan Posted January 26, 2008 Share Posted January 26, 2008 I also need a script that turns the pc back into whatever he/she looked like before; or a script that reverses the gizka tranformation. This script should work void main() { object oPC = GetFirstPC(); AssignCommand(oPC, ClearAllEffects()); } Link to comment Share on other sites More sharing options...
Darth Xander Posted January 26, 2008 Author Share Posted January 26, 2008 Thanks sekan, also I am having problems with how to spawn the icp because I am having trouble getting the coordinates. Link to comment Share on other sites More sharing options...
Stream Posted January 26, 2008 Share Posted January 26, 2008 Just press ` to bring up the console and type whereami, it will display the coordinates of the PC. First cheats need to be enabled, open swkotor.ini in the main installation folder, and under the game options either edit or add EnableCheats=1 --Stream Link to comment Share on other sites More sharing options...
Darth Xander Posted January 26, 2008 Author Share Posted January 26, 2008 Just press ` to bring up the console and type whereami, it will display the coordinates of the PC. First cheats need to be enabled, open swkotor.ini in the main installation folder, and under the game options either edit or add EnableCheats=1 --Stream I did that but the coords are extremley short when they should be a lot longer. Link to comment Share on other sites More sharing options...
Stream Posted January 26, 2008 Share Posted January 26, 2008 I don't think it really matters, after a certain amount of digits it's just some really small changes that aren't very noticeable. --Stream Link to comment Share on other sites More sharing options...
Darth Xander Posted January 26, 2008 Author Share Posted January 26, 2008 Ok thanks. Link to comment Share on other sites More sharing options...
Marius Fett Posted January 26, 2008 Share Posted January 26, 2008 The co-ords only appear long in K-GFF. Link to comment Share on other sites More sharing options...
Darth Xander Posted January 27, 2008 Author Share Posted January 27, 2008 What if i put the coords into a spawn script, will the script work? Link to comment Share on other sites More sharing options...
Marius Fett Posted January 27, 2008 Share Posted January 27, 2008 void main() { float x = x_co_here; float y = y_co_here; float z = z_co_here; float r = orientation_here; vector vPla = Vector(x, y, z); location lPla = Location(vPla, r); object oPla = CreateObject(OBJECT_TYPE_PLACEABLE, "resref_here", lPla); } Replace x_co_here y_co_here and z_co_here with the X Y Z co-ordinates respectively. And replace orientation_here with the orientation. And obviously resref_here with the panels resref. Link to comment Share on other sites More sharing options...
Darth Xander Posted January 28, 2008 Author Share Posted January 28, 2008 Ok guys, last few quesitons...I hope First of all, which is the best dlg file to use to insert my script? bearing in mind that my icp is in the "Communications Room". Second, could somebody provide a script that spawns an npc and a door at the same time plz? Also before I may not have been clear by "Destroy Panel Script" I meant blows up and vanishes so may I have a script that does just that plz? Thanks a lot for a lot for your help people i will credit you when it comes to distribution time XP ~DX Link to comment Share on other sites More sharing options...
Stream Posted January 29, 2008 Share Posted January 29, 2008 To spawn and NPC & Door at the same time try this script void main() { object oNPC = GetObjectByTag("[b]NPC_TAG[/b]"); object oDoor = GetObjectByTag("[b]DOOR_TAG[/b]"); if ((oNPC == OBJECT_INVALID) || (oDoor == OBJECT_INVALID)) CreateObject(OBJECT_TYPE_CHARACTER, "[b]NPC_TAG[/b]", Location(Vector(x, y, z), 0.0)); CreateObject(OBJECT_TYPE_DOOR, "[b]DOOR_TAG[/b]", Location(Vector(x, y, z), 0.0)); } That may need tweaking as I haven't got any source files with me at the moment and I''ve done that from memory. As for where to fire the script, it's best to choose a dialog that fires automatically. Sorry I can't help with the destroying the panel as I haven't got nwscript here to look at. --Stream Link to comment Share on other sites More sharing options...
Darth Xander Posted January 30, 2008 Author Share Posted January 30, 2008 Well sorry Deadly Stream but that script does not work. I was after a script that spawns an npc next to the pc and a door at a specific place. EDIT: Forget the double script I found a way around that but thre are two scripts left I need. 1: A script to spawn a door at a specific lcoation and 2. A script that makes the panel "bashable" or make it blow up. Link to comment Share on other sites More sharing options...
Marius Fett Posted January 30, 2008 Share Posted January 30, 2008 Isn't spawning a door the same as spawning a placeable? If it is use this: void main() { float x = X Coordinate; float y = Y Coordinate; float z = Z Coordinate; float r = Orientation; vector vPla = Vector(x, y, z); location lPla = Location(vPla, r); object oPla = CreateObject(OBJECT_TYPE_PLACEABLE, "Template ResRef", lPla); } Just add the coordinates etc in as you go. Link to comment Share on other sites More sharing options...
Stream Posted January 30, 2008 Share Posted January 30, 2008 No each kind of object is different so the game knows exactly what kind of object it's dealing with, here's the excerpt from nwscript; int OBJECT_TYPE_CREATURE = 1; int OBJECT_TYPE_ITEM = 2; int OBJECT_TYPE_TRIGGER = 4; int OBJECT_TYPE_DOOR = 8; int OBJECT_TYPE_AREA_OF_EFFECT = 16; int OBJECT_TYPE_WAYPOINT = 32; int OBJECT_TYPE_PLACEABLE = 64; int OBJECT_TYPE_STORE = 128; int OBJECT_TYPE_ENCOUNTER = 256; int OBJECT_TYPE_SOUND = 512; int OBJECT_TYPE_ALL = 32767; Have you made sure you entered the tag of the door and not the ResRef? --Stream Link to comment Share on other sites More sharing options...
Darth Xander Posted January 31, 2008 Author Share Posted January 31, 2008 Yes the tag and the resref are both the same. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.