Jump to content

Help Adjusting a script


ben446

Recommended Posts

Ok so im back with need of a little help with adapting a script. Its a script that has been given out as a modders resource by DarkFox127. Its a teleport script. Ive managed to use the script as is to make a teleport spell that allows the player to teleport back to the house im creating. I want to adapt the script so it works on a sword so when a foe is struck by the sword they are teleported to another cell.

 

This is the orginal script

 

ObjectReference Property Loc1

 

Eventoneffectstart (Actor akTarget, Actor akCaster)

 

Utility.wait(1.5)

Game.FadeoutGame(False,True,2.0, 1.0)

Game.GetPlayer()Moveto(loc1)

Game.EnableFastTravel()

Game.FastTravel(Loc1)

 

EndEvent

 

 

 

Ok so after watching a tutorial that went with the script that explained the script and also that it could be adapted. It gave me the idea to use it on a weapon so you can teleport a foe to another cell. SO I set about adapting the script and it looked like this

 

 

ObjectReference Property loc1

 

Eventoneffectstart (Actor akTarget, Actor akcaster)

 

Utility.Wait(1.5)

Game.Fadeoutgame (False,True,2.0 1.0)

Gme.GetActor akTarget() Moveto (Loc1)

Game.EnableFastTravel()

Game.FastTravel(Loc1)

 

EndEvent.

 

 

When I go to compile it I get the following error:

 

 

No viable Alernative at input 'GetActor'

 

Now my scripting knowledge aint that good. I can read a script but I cant write one. Ive exhausted my knowledge and still cant fix this issue. Would someone be able to point me in the right direction to fix the error, by explaining what the error means. If someone can fix the script for me id be even more grateful. So id like to thank all those who read this post and anyone who can fix my issue.

Link to comment
Share on other sites

Just some syntactical errors.

ObjectReference Property loc1 auto
 
Event OnEffectStart (Actor akTarget, Actor akCaster)
 
Utility.Wait(1.5)
Game.FadeOutGame(False,True,2.0, 1.0)
akTarget.Moveto(loc1)
Game.EnableFastTravel()
Game.FastTravel(loc1)
 
EndEvent
Edited by Rasikko
Link to comment
Share on other sites

thank you both for your help. sorry it took so long to reply. I had a funeral to go to yesterday.

 

ive just run the script and it worked thank you so much. I can read a script and know a little bit to adapt them but I couldn't work out how to adapt this one for what I needed. Im really grateful for your help

Edited by ben446
Link to comment
Share on other sites

  • Recently Browsing   0 members

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