A little scripting help please.

Post » Tue Dec 18, 2012 9:19 am

Ok so I'm mashing together this script which effectively is similar to the survivial scripts. In this case player activates a water source, well, trough in my case and gets the message "Do you want to refill your empty water bottles?" I'm up to the part where the player has to have at least 1 empty bottle for the message to appear but I don't know how to remove all the empty water bottles a player has and replace them with full ones. I can Add/Remove items, done it before but I need the script to know how many empties to remove (all in this case) and replace with full bottles of the same quantity. Here's what I've managed so far and it works I get the message...

Message Property MyMessage Auto
MiscObject Property EmptyBottle Auto
Potion Property Water Auto

Event OnActivate(ObjectReference akActionRef)

if Game.GetPlayer().GetItemCount(EmptyBottle) >>0

if akActionRef == Game.GetPlayer()
Int iButton = MyMessage.Show()
If iButton == 0
endif
endif
endif

endEvent
User avatar
lauren cleaves
 
Posts: 3307
Joined: Tue Aug 15, 2006 8:35 am

Return to V - Skyrim