fadingsignal Posted March 9, 2016 Share Posted March 9, 2016 Hey all! So, here's the basic outline. Spell / magic effect is on the player. When the conditions are right (time of day, whatever) small waves of enemies (2 or 3 at a time) will spawn at a distance around the player every x seconds (or as they are killed) while the player moves around the worldspace, so this 'spawn cloud' follows them. The rudimentary portions of this are fairly straight-forward and functional, but there are some hitches that I can't figure out how to resolve, namely that static spawn points are not placed anywhere in the world for this purpose, so figuring out the xyz of where to place the spawned enemy in relation to player could result in spawning them half inside a tree, or under a hill. Is this a 'showstopper' that is unavoidable? Or are there any sophisticated methods to determine the height of the landscape to place an enemy (or other methods?) One thought was that I could make a singular spawner in each worldspace cell (lord help me), make them all appear there with a travel package to the player, so they appear a little more spread out / random. Thoughts? Thank you in advance! Link to comment Share on other sites More sharing options...
Hoamaii Posted March 9, 2016 Share Posted March 9, 2016 Not sure that may help but what you're trying to do reminds me of the way Mitchalek spawns horses around the player or followers - I've never seen any spawn in a mountain slab or a tree even when spawning at some distance from the player when called by the whistle. Perhaps, you could take a look at his scripts? (I think he does include sources in his bsa). Link to comment Share on other sites More sharing options...
fadingsignal Posted March 10, 2016 Author Share Posted March 10, 2016 That's actually a really great idea, thanks! Link to comment Share on other sites More sharing options...
Hoamaii Posted March 10, 2016 Share Posted March 10, 2016 Lol, I just realized I had not even mentioned Convenient Horses in my answer!... Really late... :facepalm: Link to comment Share on other sites More sharing options...
fadingsignal Posted March 10, 2016 Author Share Posted March 10, 2016 Lol, I just realized I had not even mentioned Convenient Horses in my answer!... Really late... :facepalm: I knew what you meant :) I went through the code and it doesn't quite have what I need, though still helpful. There are two scenarios where calling horses happens:The whistle, which applies a travel package to the horse ref wherever you left it standing, so it actually travels to you along the road/path, thus, no need for placement or calculations. The horn blowing "summon" effect, which makes the horse appear/fade-in very close to the player, and thus also does not require much calculation except a 90 deg angle and a few feet from the player.So, I still need something between the two. There are A LOT of cells in the outer world, so placing spawn points in each cell would be nightmarish. I wish there was a height coordinates function when you feed in an x/y position. It would be so useful for so many things! Link to comment Share on other sites More sharing options...
DarthWayne Posted March 15, 2016 Share Posted March 15, 2016 (edited) Maybe this helps: 1. Search for some random spawnpoints ObjectReference ref = Game.FindRandomReferenceOfTypeFromRef(Form arBaseObject, ObjectReference arCenter, float afRadius)2. Spawn your enemies Actor actorref = ref.PlaceActorAtMe(ActorBase akActorToPlace, int aiLevelMod = 4,EncounterZone akZone = None) 3. Move the spawned enemies to nearest navmeshed area actorref.MoveToNearestNavmeshLocation() Edited March 15, 2016 by DarthWayne Link to comment Share on other sites More sharing options...
sLoPpYdOtBiGhOlE Posted March 18, 2016 Share Posted March 18, 2016 Maybe this helps: 1. Search for some random spawnpoints ObjectReference ref = Game.FindRandomReferenceOfTypeFromRef(Form arBaseObject, ObjectReference arCenter, float afRadius)2. Spawn your enemies Actor actorref = ref.PlaceActorAtMe(ActorBase akActorToPlace, int aiLevelMod = 4,EncounterZone akZone = None) 3. Move the spawned enemies to nearest navmeshed area actorref.MoveToNearestNavmeshLocation()MoveToNearestNavmeshLocation() ??? Never heard of it, not listed in any of my source scripts or on CK wiki or SKSE that I can find.A google search got one hit and it was for word function definitions in UltraEdit.Maybe you could post a link to where you got that function from or it's use? Link to comment Share on other sites More sharing options...
DarthWayne Posted March 18, 2016 Share Posted March 18, 2016 Oh, yeah you are right. It is a new papyrus function in Fallout 4. Found it while reading through some of the decompiled scripts. :D Link to comment Share on other sites More sharing options...
Recommended Posts