Jump to content

How to use MoveTo script function to move NPC to marker?


Jackal2233

Recommended Posts

Hi guys, I'm trying to edit a script file that clones an NPC.

 

The original script using Disable() or DisableNoWait() or Delete() on its original while cloning a copy which removes their spawns permanently and I'd rather not do that.

I want to use Kill() on the actor but move them away from player sight in doing so. So far I'm using target.Kill() and then target.SetPosition(0.0, 0.0, -1000.0) but it doesn't move them anywhere.

 

So I am wondering how to use the MoveTo function to send them somewhere else. The E3DemoMarker in AAA test cell looks like a nice place to dump.

 

Something like...
ObjectReference killzone
target.MoveTo(killzone)

Except how do I reference killzone to be E3DemoMarker for example?

Link to comment
Share on other sites

Thanks, how do I fill it afterwords as E3DemoMarker?
Right now it says "no viable alternative at input 'Property'" when trying to compile.

 

If it's a marker you can add the property and fill it afterwards as E3DemoMarker:

 

ObjectReference Property killzone auto

 

And in the script:

 

[however you reference the target].MoveTo(killzone)

Edited by Jackal2233
Link to comment
Share on other sites

Erm... so I added the lines above, then went to the quest, added filled it up with anything on the aaamarkers cell as corpses are just teleporting there anywhere, but script wont compile, same error as before. Sorry this must be such a noob post and a simple tweak

Link to comment
Share on other sites

Are you editing a vanilla script? Cause they can break real easily with tweaks like this-

 

I'm not sure about your error out of context but if you add that ObjectReference Property line in the top property section, and use the same name for your property up there as you do in the script, it will compile - and if NPCs are moving it sounds like the rest of the script is working

 

Let me check something on respawning

Edited by 37G
Link to comment
Share on other sites

Nah, mod script. It seems to work as scripted now but it seems moving the actor (placed by CK, not spawned by encounter) away from the cell means it won't respawn.

 

I tested the kill() function with the setposition and I come back after 30 days and they respawn.

But not with moveto function when it moves them to a different cell.

 

All I want to do is to remove the bodies of the pre-clones without messing up the actor respawning in the future. The setposition command would have been perfect (and works) if I can only place them like -30000 units away from the player.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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