Usable Teleportation Amulet

Post » Fri Oct 04, 2013 10:29 pm

I was trying to make the Dovahkiin Amulet so it will teleport you to the hideout. Currently I have a script on the amulet so when it's removed from the chest that it advances the quest. I could remove that and add the script to the chest so that when the player removes the amulet from the chest the quest advances. That would mean instead of a script for the quest on the amulet, I could have a script on it for the teleport effect.

I had made an effect, Enchant, and a Keyword in case I need it. I duplicated an existing effect that could be assigned to an enchantment. Once I had all the pieces together I tried it and it doesn't work. I did something wrong.

Scriptname HideoutTeleportScript extends activemagiceffect   ObjectReference Property HideoutDestination Auto Event OnActivate(ObjectReference ActionRef)   Game.GetPlayer().MoveTo(HideoutDestination)EndEvent


The enchantment is on the amulet. The script is attached to the effect. Should I do it differently? I wanted to have it so the player could add the amulet as a favorite and from the favorites menu activate the amulet to teleport you to the hideout. All that happens at the moment is the player sees the teleport effect swirls around them when they equip the amulet, and they don't move to the marker. I can't use the item like I can with a potion.

I guess if what I want isn't really possible I could make it to where when you equip the item it activates it with OnEquipped(ObjectReference) but I really wanted the amulet to be a usable item that taleports you only when used. I was hoping the user didn't have to equip the item first, just use it from inventory.

What options do I have?

User avatar
Nitol Ahmed
 
Posts: 3321
Joined: Thu May 03, 2007 7:35 am

Return to V - Skyrim