Jump to content

Spawning an NPC from an item


FiftyTifty

Recommended Posts

Try this script instead , sorry didn't have your dispell line yet when I was editing it , and then notice I change the let command to set.


scn AAAFyTyRoboticianProtectronKitScript

int iWait
int iButton

Begin ScriptEffectStart
    Set iButton to -1
    Print "Showing Message"    
    ShowMessage AAAFyTyRoboticianMessageRepairProtectron
    Set iWait to 1
End

Begin ScriptEffectUpdate

   If iWait == 1 
    Set iButton To GetButtonPressed 
    Print $iButton
    If iButton > -1
      if iButton == 0
         Player.PlaceAtMe AAAFyTyFactoryProtectron 1
         Set iWait to 0
        ;Dispel MyIngestible
    elseif iButton == 1
         Player.PlaceAtMe AAAFyTyMetroProtectron 1
​         Set iWait to 0
        ;Dispel MyIngestible
    elseif iButton == 2
         Player.PlaceAtMe AAAFyTyNukaColaProtectron 1
        ​ Set iWait to 0
        ;Dispel MyIngestible       
    elseif iButton == 3
         Player.PlaceAtMe AAAFyTyProtectronArmy 1
        ​ Set iWait to 0
        ;Dispel MyIngestible
    elseif iButton == 4
         Player.PlaceAtMe AAAFyTyProtectronArmyDC 1
        ​ Set iWait to 0
        ;Dispel MyIngestible
    elseif iButton == 5
         Player.PlaceAtMe AAAFyTyProtectronDC 1
        ​ Set iWait to 0
        ;Dispel MyIngestible       
    elseif iButton == 6
         Player.PlaceAtMe AAAFyTyProtectronNV 1
        ​ Set iWait to 0
        ;Dispel MyIngestible
    elseif iButton == 7
         Player.PlaceAtMe AAAFyTyProtectronEnclaveDC 1
        ​ Set iWait to 0
        ;Dispel MyIngestible
    elseif iButton == 8
         Player.PlaceAtMe AAAFyTyProtectronOutcast 1
        ​ Set iWait to 0
        ;Dispel MyIngestible
    elseif iButton == 9
         Player.PlaceAtMe AAAFyTyVaultProtectron 1
        ​ Set iWait to 0
        ;Dispel MyIngestible
    endif
 endif
endif
End
Link to comment
Share on other sites

Aye it works fine. Just now I have to figure out why subsequent EVP calls aren't working on the spawned NPCs. The first time I call EVP, the NPC selects the proper new package. But if I change the number of tokens (the item that the packages' conditions look at), it doesn't change, it sticks with the old package.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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