Okay, this is how the script in my notes looks now:
Revised Script B
Scriptname STL_XenoItemMaker
Short CraftItem
Short Button
Begin OnActivate
If OnActivate == 1
If CraftItem == 0
ShowMessage STLAssemblerMenu
Set Craftitem to 1
Endif
Endif
;Message STLAssemblerMenu ; STLAssemblerMenu will be - "Nano-Constructor interface online. Please select item to synthesis." "Alien Ammo Cells" "Alien Power Modules" "Alien Apoxy" "Atomiser Pistol" "Enhanced Alien Apoxy" "Firelance" "Alien Energy Weapon" "Disruptor Rifle" "Drone Cannon" (note ? message is to be GECK Message Object with options listed as separate entries corresponding to the button pressed)
If craftItem == 1
Set Button to GetButtonPressed
Begin GameMode
If Button == 0
If Player.ItemCount STL_NGoo >= 2
Player.RemoveItem STL_NGoo 2
Player.AddItem ! 1 ;! = GECK code for Alien Power Cell}
ShowMessage Alien Power Cell has been created.
Set CraftItem to 0
Elseif PlayerItemCount STL_NGoo < 2
ShowMessage Insufficient NanoGoo.
Set CraftItem to 0
Endif
Elseif
If Button == 1
If Player.ItemCount STL_NGoo >= 2
Player.RemoveItem STL_NGoo 2
Player.AddItem ? 1 ;? = GECK code for Alien Power Module
ShowMessage Alien Power Module has been created.
Set CraftItem to 0
Elseif PlayerItemCount STL_NGoo < 2
ShowMessage Insufficient NanoGoo.
Set CraftItem to 0
Endif
Elseif
If Button == 2
If Player.ItemCount STL_NGoo >= 5
Player.RemoveItem STL_NGoo 5
Player.AddItem $ 1 ; $ = GECK code for Alien Aploxy
ShowMessage Alien Apoxy has been created.
Set CraftItem to 0
Elseif PlayerItemCount STL_NGoo < 5
ShowMessage Insufficient NanoGoo.
Set CraftItem to 0
Endif
Elseif
If Button == 3
If Player.ItemCount STL_NGoo >= 10
Player.RemoveItem STL_NGoo 10
Player.AddItem % 1 ;% = GECK code for Alien Atomiser
ShowMessage Alien Atomiser has been created.
Set CraftItem to 0
Elseif PlayerItemCount STL_NGoo < 10
ShowMessage Insufficient NanoGoo.
Set CraftItem to 0
Endif
Elseif
If Button == 4
If Player.ItemCount STL_NGoo >= 10
Player.RemoveItem STL_NGoo 10
Player.AddItem & 1 ;& = GECK code for Enhanced Alien Apoxy
ShowMessage Alien Apoxy (Enhanced) has been created.
Set CraftItem to 0
Elseif PlayerItemCount STL_NGoo < 10
ShowMessage Insufficient NanoGoo.
Set CraftItem to 0
Endif
Elseif
If Button == 5
If Player.ItemCount STL_NGoo >= 15
Player.RemoveItem STL_NGoo 15
Player.AddItem * 1 ;* = GECK code for Firelance
ShowMessage Firelance has been created.
Set CraftItem to 0
Elseif PlayerItemCount STL_NGoo < 15
ShowMessage Insufficient NanoGoo.
Set CraftItem to 0
Endif
Elseif
If Button == 6
If Player.ItemCount STL_NGoo >= 15
Player.RemoveItem STL_NGoo 15
Player.AddItem + 1 ;+ = GECK code for Alien Energy Weapon
ShowMessage Alien Energy Weapon has been created.
Set CraftItem to 0
Elseif PlayerItemCount STL_NGoo < 15
ShowMessage Insufficient NanoGoo.
Set CraftItem to 0
Endif
Elseif
If Button == 7
If Player.ItemCount STL_NGoo >= 20
Player.RemoveItem STL_NGoo 20
Player.AddItem @ 1 ;@ = GECK code for Disruptor rifle
ShowMessage Disruptor Rifle has been created.
Set CraftItem to 0
Elseif PlayerItemCount STL_NGoo < 20
ShowMessage Insufficient NanoGoo.
Set CraftItem to 0
Endif
Elseif
If Button == 8
If Player.ItemCount STL_NGoo >= 30
Player.RemoveItem STL_NGoo 30
Player.AddItem # 1 ;# = GECK code for Drone Cannon
ShowMessage Alien Power Cell has been created.
Set CraftItem to 0
Elseif PlayerItemCount STL_NGoo < 30
ShowMessage Insufficient NanoGoo.
Set CraftItem to 0
Endif
Endif
Endif
So, have I made any more basic mistakes so far that make me look dumb?
Anyway, this script still needs to be tweaked a little, I know, as the actual Assembler Pad is supposed to work from the inventory, and be carryable by the player.
I know this means changing the 'OnActivate' commands, but I don't know to what, or even if this can be done this way. (I hope it can be, as that's pretty much what I had in mind for this item.)
if it can't be done then it needs something like this, right?
Add to Short list "OnGround" and "Button2"
Change the beginning to this -
If OnActivate = = 1
If OnGround == 0
ShowMessage STL_CarryOrNot ; GECK Message setup with options "Use assembler" and "Pick Up Assember"
Set Button2 to GetButtonPressed
Begin GameMode
If Button2 == 0
Set CraftItem to 1
endif
elseif Button2 == 1
Player.AddItem STL_Assem1 ; code I'm gonna use for the assembler pack item
RemoveItem STL_AssemStatic ; code for the version of the Alien pad static that I'll create to be this 'inworld.' {Pretty sure this command is wrong}
Set OnGround to 1
Endif
Endif
endif
This would then be accompanied by a section telling it to set Onground to 0 again if dropped from the inventory, but I don't know what that is (hey, I'm working from notebooks and a laptop that can't run Fallout 3 here until my :swear: computer is working again (turns out all the problems I've had previously while trying to work on my mod are due to a fubar BIOS, which has now managed to Kill my motherboard, so it'll be a while.))