Quick check on a script?

Post » Fri May 27, 2011 4:36 pm

Ok so i pulled and modified this script from one i utilized in morrowind. Is the language still more or less the same?? Ive tried searching around on the tutorials on the official site and whatnot but i havent been able to find much in the way of this sort of thing =/

Any input or tips from the more experienced than i?

Begin Primm_HomeShort PurchasevarShort buttonif ( onactivate == 1 )if ( Purchasevar == 0 )	MessageBox "The Primm settlement residents offer this home to anyone willing to shell out a few caps. BE WARNED: This Home will need additional investment to make livable. Would you like to purchase this home?", "Purchase Home for 50 caps", "Not right now"		Set PurchaseVar to 1	elseif ( PurchaseVar > 1 )		Activate	endifendifif ( PurchaseVar == 1 )	set button to GetButtonPressed	if ( button == -1 )		return	elseif ( button == 0 )			if ( player.GetItemCount "000000F" >= 50 )				 player.RemoveItem "000000F" 50				 player.AddItem "Key_Primmhome" 1				 set PurchaseVar to 2				else						 return				endif	else		set PurchaseVar to 0		return	endifendifEnd

User avatar
candice keenan
 
Posts: 3510
Joined: Tue Dec 05, 2006 10:43 pm

Post » Fri May 27, 2011 11:06 am

Similar, but much closer to Oblivion. Check the GECK wiki or the Construction Set wiki for tutorials (CS wiki has more).
Also use editor IDs, not base IDs.
User avatar
neil slattery
 
Posts: 3358
Joined: Wed May 16, 2007 4:57 am

Post » Fri May 27, 2011 9:10 am

Interesting. Things have apparently changed since Morrowind.
User avatar
Jeff Tingler
 
Posts: 3609
Joined: Sat Oct 13, 2007 7:55 pm

Post » Fri May 27, 2011 7:05 am

Two things Ive noticed,

1) Messageboxes dont work like that anymore. Now they are actual objects found in the misc tab of the object window. There is a checkbox to make them message boxs, or just messages that display at the top.

E.g.

Showmessage ChiTestMessage
set purchasevar to 1

;where ChiTestMessage is the objectID of the message you have created in the object window, complete with all the relevant buttons.

2) Its player.additem , not player-> additem

Hope that helps.
User avatar
CRuzIta LUVz grlz
 
Posts: 3388
Joined: Fri Aug 24, 2007 11:44 am

Post » Fri May 27, 2011 5:26 pm

Two things Ive noticed,

1) Messageboxes dont work like that anymore. Now they are actual objects found in the misc tab of the object window. There is a checkbox to make them message boxs, or just messages that display at the top.

E.g.

Showmessage ChiTestMessage
set purchasevar to 1

;where ChiTestMessage is the objectID of the message you have created in the object window, complete with all the relevant buttons.

2) Its player.additem , not player-> additem

Hope that helps.


no wonder i couldnt find anything about message boxes for scripting with fallout.
ahh, i shoulda known about the player.additem thing =/

Thanks for info. gonna keep digging now that ive gotten sleep!
User avatar
brandon frier
 
Posts: 3422
Joined: Wed Oct 17, 2007 8:47 pm


Return to Fallout: New Vegas