Jump to content

Slight problem with my Script


Recommended Posts

The Script wasn't attached to the fridge, I had a fridge container in a seperate cell , the script was attached to an activator , I ended up doing it the long way round writing huge if statements
since NukaMix has the Most it worked to me writing

If (Game.GetPlayer().GetItemCount(Mix1) < Trade); Player Doesn't have A Warm Drink
Debug.Notification("You Need A Warm One")
ElseIf (selectedOption == 0) ; Newka Cola Cold
Game.GetPlayer().AddItem(Cold1); Newka Cola Cold
EndIf
Like 17 times lol

The Plan Was to have 1 fridge where it would remove the warm variant and give me the cold of selected variant
However since a message can Only hold 19 slots i have had to split the messages over 4 different activators

Beer
Vim
Nuka
Nuka Mix
I do have a message to act as a main menu with the 4 slots , but I would know how to.

Select Beer , Beer Message Shows , make selection of Drink or Go Back to Main Menu
Link to comment
Share on other sites

Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer)

	If (akNewContainer == PlayerRef)
		
		RegisterForMenuOpenCloseEvent("ContainerMenu")

        endif
EndEvent

Event OnMenuOpenCloseEvent(string asMenuName, bool abOpening)

	If (asMenuName == "ContainerMenu" && abOpening == False)

		UnregisterForMenuOpenCloseEvent("ContainerMenu")

	EndIf
EndEvent

You will need those two events

Link to comment
Share on other sites

The fridge container is in a seperate cell that i have called storagecell.
the fridge activator is in the player home cells

At the moment to get the desired function i have spread out around each home
A Gwinnett poster for getting cold beer
A nuka clock for getting cold standard nuka
A nuka flag for the nuka mixes
and a Vim poster for vim.

And put them as trading in warm variants will give you a cold, my player homes are somewhat different sizes so have to think outside the box lol

Link to comment
Share on other sites

Anyone know what i should be ending this with
The script works but i am not sure how to set the teleport marker as a location?

 

Event OnActivate(ObjectReference akActionRef)
int selectedOption = BuyAPet.Show()
If (selectedOption == 1) ; Cancel
return
EndIf
If (Game.GetPlayer().GetItemCount(Caps001) < CostToBuy) ; Player doesn't have enough caps
Debug.Notification("You need more Caps")
return
EndIf
Game.GetPlayer().RemoveItem(Caps001, CostToBuy)
If (SelectedOption==0);
TelePortIn.Cast(Cat)
EndIf
EndEvent
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...