Jump to content

How to move an object with script


Recommended Posts

Im trying to work out how to move an object to the player via a magic effect, I can only get it to work if its an actor: This script works:

 

Scriptname BREACH extends activemagiceffect

Actor property BRAC Auto Const Mandatory

Event OnEffectStart(actor t, actor c)

BRAC.MoveTo ( c )


EndEvent


BRAC is the reference of the object (actor) which is placed in a testing cell, it must be a specific reference so when you double click on the npc in the creation kit I name it BRAC. Works fine

Except I want it to be a static or marker of some kind, but when I change this line to
Actor property BRAC Auto Const Mandatory

Static property BRAC Auto Const Mandatory


it gets an error on compiling the script saying that static cannot be called as an object reference

Question is, how can I get this script to work on a static object instead.

The idea behind the script is a portal, reversing the script to move back and forth between the 2, I only used an actor to get the basics to work and it teleports fine, I just cant get it to work with anything else

As you can see I'm not super good at scripting, just trying to get a basic mark and recall going here

Edited by thelonewarrior
Link to comment
Share on other sites

  • Recently Browsing   0 members

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