Jump to content

Formlist and Container


Zorkaz

Recommended Posts

Vending Machine:

I want to have a bunch of items in a formlist (All variants of Nuka Cola)

When a container is activated in which various Nuka Colas, Quantums and cold variants reside one of them gets removed and replaced with caps.

 

Now I already made a script like this

Event OnActivate (ObjectReference AkActionRef)
If Self.getitemcount (NukaColaQuantum_Cold) > 0
Self.removeitem (NukaColaQuantum_Cold)
TheValue = NukaColaQuantum_Cold.getgoldvalue()
Self.additem (Caps001, TheValue)
Elseif Self.getitemcount (NukaColaQuantum) > 0
Self.removeitem (NukaColaQuantum)
TheValue = NukaColaQuantum.getgoldvalue()
Self.additem (Caps001, TheValue)
Endif
EndEvent

But I actually find this inefficient. I think I can put the Colas in a formlist.

But how do i determine which object has been removed so I can get its gold value?

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

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