Jump to content

Skeletal Companion Script


EmilioRGarcia

Recommended Posts

I am not new to making my own mods, but I am new to scripts. I just did the tutorials given by Bethesda, and so...I'm ambitious. What I want to do is to create a script that is linked to an activator (the tool kit on the table). The end goal: spawn a skeletal follower.

 

Details:

I want there to be a requirement for the script to go through. If the player has 1 Black Filled Soul Gem, 1 Bone Meal, 1 Void Salts, and 1 Troll Fat, it will disable the skeleton on the table and spawn a new skeletal follower in its place. I already have the actor EmiG_SkeletalCompanion01, so I just need it to appear.

 

Here is my script so far:

Scriptname EmiG_MakeSkeleton01DisappearScript extends ObjectReference
{Will make the Skeleton disappear.}
objectreference property EmiG_skeletoncompanion auto
auto state waiting
event onactivate(objectreference akactionref)
EmiG_skeletoncompanion.disable()
gotostate("done")
endevent
endstate
state done
;
endstate
ingredient property bonemeal auto
int property quantity auto
actor playerref
event onactivate(objectreference akactivator)
playerref = game.getplayer()
if akactivator == playerref
playerref.removeitem(bonemeal, quantity)
endif
endevent
So far, I can remove items from the player's inventory, but I want the operation to fail if the player does not have the ingredients. Additionally, I would like the skeleton companion to spawn in the "EmiG_SkeletonCompanion" static skeleton's place. Can anyone help me?
Edited by EmilioRGarcia
Link to comment
Share on other sites

  • Recently Browsing   0 members

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