Jump to content

Help with scripting


ZansoHel

Recommended Posts

Hey! I am quite a newbie with scripting and hadn't had any luck creating a working version of following script.

 

I have tried to create a script which would teleport the player to another location (area) when a custom shout would be casted upon an object.

Cast custom shout on an object --> teleport player to another area.

 

I would appreciate any help!

Link to comment
Share on other sites

Hey! I am quite a newbie with scripting and hadn't had any luck creating a working version of following script.

 

I have tried to create a script which would teleport the player to another location (area) when a custom shout would be casted upon an object.

Cast custom shout on an object --> teleport player to another area.

 

I would appreciate any help!

Ok this is what you got to do find the actor called player add a new script to that actor like the one below anything with quotes is what you're name is for that thing also anything that property before it make sure you add it in by going to add properties .

You will need to make a object where you are going to teleport to can be anything just make sure there is only one of that object

 

Scriptname "scriptname" extends ObjectReference

SPELL Property "name of shout" Auto

ObjectReference Property "name of object you are going to teleport to" Auto

ObjectReference Property Player Auto

 

 

Event OnSpellCast(Form akSpell)

Spell spellCast = akSpell as Spell

if spellCast && spellCast == "name of shout"

Player.MoveTo("name of object you are going to teleport to")

 

endif

endEvent

Edited by codeyhanson
Link to comment
Share on other sites

Hey!

 

I hadn't had time to test your script yet, but I actually got my own version working some time later after I posted the message. But I am sure to give your one a try too!

 

 

Scriptname TeleportScript extends ObjectReference

 

ObjectReference Property TeleportDes auto

 

Event OnMagicEffectApply(ObjectReference akActionRef, MagicEffect akSpelleffect)

Game.GetPlayer().MoveTo(TeleportDes)

EndEvent

 

However, thanks a lot for helping! :)

Link to comment
Share on other sites

  • Recently Browsing   0 members

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