Author Topic: Making a Reoccurring Script?  (Read 833 times)

LadyPhoenixFireRose

  • Modder Emissary
  • *****
  • Posts: 279
  • Karma: +14/-0
    • View Profile
Making a Reoccurring Script?
« on: May 01, 2016, 05:45:53 PM »
Okay so I have edited the script the summons a deadra when you pick up a certain gold coins, made one to summon a wolf when you open any of the chests in my Abode. My issue though, is this only happens one time. So I open the chest, kill the wolf, then I can safely reopen the chest. I don't want this to be the case. I want a wolf to show up every time you open a chest. So idea on how I can go about changing the script to do that?
"If Death doesn't kill you, then nothing will."
"Fate can only do so much for a person, the rest is up to them."

Autoclock

  • Modder Emissary
  • *****
  • Posts: 354
  • Karma: +29/-0
  • I am the Eggman. I am the Walrus. Koo-koo-kajoob.
    • View Profile
Re: Making a Reoccurring Script?
« Reply #1 on: May 01, 2016, 05:58:05 PM »
The script looks something like this, right?

Quote
begin BILL_MarksDaedraSummon
; Summon an Daedra when an item is removed from altar
;
; script location: should be placed upon an object on a Daedric Altar

; variables
short done

if ( OnActivate == 1 )
   if ( done == 1 )
      Activate
      return
   else
      Set done to 1
      PlaceAtPC "Dremora_lord" 1 128 1
      ;1 of them, 256 units away, in back (1) of the player
      Activate
     ; HERE
   endif
endif

End

You'll need to add "set done to 0" where I've marked "; HERE". That will reset the conditions, so the next time you touch the object, a wolf will appear again.
Mod not for recognition, but for respect for the craft.

LadyPhoenixFireRose

  • Modder Emissary
  • *****
  • Posts: 279
  • Karma: +14/-0
    • View Profile
Re: Making a Reoccurring Script?
« Reply #2 on: May 01, 2016, 06:20:32 PM »
Thank you I'll fix the script.
"If Death doesn't kill you, then nothing will."
"Fate can only do so much for a person, the rest is up to them."