tesfan1999 Posted November 4, 2017 Share Posted November 4, 2017 For a mod I'm making, I need the player to be able to craft a dwemer lexicon that, when dropped and activated, will spawn a dwemer centurion. I can do the recipe and object, but how do i turn it into a centurion? Link to comment Share on other sites More sharing options...
tesfan1999 Posted November 5, 2017 Author Share Posted November 5, 2017 Anybody? Link to comment Share on other sites More sharing options...
JonathanOstrus Posted November 5, 2017 Share Posted November 5, 2017 (edited) The simplest way I can think of is to put a script on the base object for the lexicon. In the script do something like this. Not sure if it compiles or will work as is as I wrote it in 30 seconds. Scriptname SpawnCenturionWhenPlayerDrops extends ObjectReference ActorBase Property Centurion Auto Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer) if !akNewContainer && akOldContainer == Game.GetPlayer() ; likely the player just dropped it self.PlaceAtMe(Centurion) self.Disable() self.DeleteWhenAble() endif EndEvent Edited November 5, 2017 by BigAndFlabby Link to comment Share on other sites More sharing options...
tesfan1999 Posted November 5, 2017 Author Share Posted November 5, 2017 Thanks, I'll try it and get back to you as soon as possible. Link to comment Share on other sites More sharing options...
tesfan1999 Posted November 5, 2017 Author Share Posted November 5, 2017 It compiles. Link to comment Share on other sites More sharing options...
tesfan1999 Posted November 5, 2017 Author Share Posted November 5, 2017 But it's not working. Nothing happens when I drop the lexicon. Link to comment Share on other sites More sharing options...
JonathanOstrus Posted November 5, 2017 Share Posted November 5, 2017 Did you fill in the property for the centurion so it knows what to spawn? It won't autofill because I intentionally used a name that isn't matching an actor base editor id. I didn't know which centurion you would want. I did a quick test and used LvlDwarvenCenturion. Link to comment Share on other sites More sharing options...
tesfan1999 Posted November 6, 2017 Author Share Posted November 6, 2017 I put in the property. Doesn't work. Link to comment Share on other sites More sharing options...
JonathanOstrus Posted November 6, 2017 Share Posted November 6, 2017 Did you modify the script at all? If so can you post the changes? Also can you post the plugin for review somewhere? I tested the same script I posted above with a trial esp and it did exactly as requested and intended. I'm not sure why it wouldn't be working for you. Link to comment Share on other sites More sharing options...
tesfan1999 Posted November 6, 2017 Author Share Posted November 6, 2017 Is it capital-sensitive? I'll try again. Link to comment Share on other sites More sharing options...
Recommended Posts