Jump to content

Could Really Use an Example Script for Spawning an Item at Coordinates


LordXayd

Recommended Posts

I've been hunting around, but I'm just not seeing an workable example for this. I have an item that I would like to be able to spawn at particular coordinates (and preferably facing a particular direction) via script.

 

I would prefer it if the script failed if the item were already present, but I dont want to overcomplicate things if that makes it a dealbreaker.

 

Basically, I'd like a player to be able to take the thing. And if they lose it, spawn another one in the same location.

 

I could certainly have it just spawn in their inventory, but it's a showcase item, so they may wish to simply have it on display in the proper place after they take one. For the same reason, I prefer to avoid using the PlaceAtMe command. Now if there were PlaceAtCoordinates, that would be something!

 

Anyway, thanks in advance guys.

 

Note: http://geck.bethsoft.com/index.php?title=PlaceAtMe

I can't tell if using PlaceAtMe via a pre-placed reference might do it?

Link to comment
Share on other sites

You can use PlaceAtMe on an x-marker and then fine tune the alignment with SetPos and SetAngle. SetPos doesn't work in remote cells, so you will want to make sure the player is in the same cell with GetParentCell before adjusting the position.

You can get the values to pass to SetPos and SetAngle by placing the item where you want it in the GECK render window and copying the position figures.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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