Tasheni Posted November 14, 2017 Share Posted November 14, 2017 I want to let my follower go on a patrol and guard in every wilderness cell. I want to start a script through dialogue (go and secure environment!) and make him move to a point not to far away and start patrolling to another point round the camp or wherever player is outside. I could start a scene through dialogue that has a patrol package attached, but this needs specific patrol markers that are dropped in a specific cell to work. Is it possible to spawn markers in the current cell and tell the npc to pass these during his patrol with a script? What would it look like?Thanks for your suggestions. Link to comment Share on other sites More sharing options...
cdcooley Posted November 14, 2017 Share Posted November 14, 2017 You can't spawn markers but you can move them. Set up your packages to use a set of markers you place as persistent objects in some holding cell. Then you can use a script to move the markers to new locations. Link to comment Share on other sites More sharing options...
foamyesque Posted November 14, 2017 Share Posted November 14, 2017 There's no way, as far as I know, to set the linked reference data (which patrol packages required) through scripting, so yeah, as cdcooley says, you'll need to set them up beforehand and then dynamically move them. I'm not totally sure how you'd deal with things like terrain altitudes, though. Link to comment Share on other sites More sharing options...
cdcooley Posted November 14, 2017 Share Posted November 14, 2017 There's no way, as far as I know, to set the linked reference data (which patrol packages required) through scripting, so yeah, as cdcooley says, you'll need to set them up beforehand and then dynamically move them. I'm not totally sure how you'd deal with things like terrain altitudes, though. If you set the packages to use a fairly wide radius to determine if they've made it to the marker it should generally work to just put the markers somewhat randomly around the player. Better yet you can use a quest to search for random nearby things (bushes, trees, rocks, flora, and even markers) by filling some aliases then move the markers to those aliased object locations. Link to comment Share on other sites More sharing options...
foamyesque Posted November 14, 2017 Share Posted November 14, 2017 There's no way, as far as I know, to set the linked reference data (which patrol packages required) through scripting, so yeah, as cdcooley says, you'll need to set them up beforehand and then dynamically move them. I'm not totally sure how you'd deal with things like terrain altitudes, though. If you set the packages to use a fairly wide radius to determine if they've made it to the marker it should generally work to just put the markers somewhat randomly around the player. Better yet you can use a quest to search for random nearby things (bushes, trees, rocks, flora, and even markers) by filling some aliases then move the markers to those aliased object locations. That's a slick idea. You could use a combination of GetHeadingAngle and GetDistance requirements to pull stuff within certain specific sectors, then move the markers to those aliases. You could still run into issues with potentially inaccessible markers in extreme cases (e.g. near a cliff) but maybe a check for major Z-axis deviations w.r.t. the player? Link to comment Share on other sites More sharing options...
cdcooley Posted November 14, 2017 Share Posted November 14, 2017 There's no way, as far as I know, to set the linked reference data (which patrol packages required) through scripting, so yeah, as cdcooley says, you'll need to set them up beforehand and then dynamically move them. I'm not totally sure how you'd deal with things like terrain altitudes, though. If you set the packages to use a fairly wide radius to determine if they've made it to the marker it should generally work to just put the markers somewhat randomly around the player. Better yet you can use a quest to search for random nearby things (bushes, trees, rocks, flora, and even markers) by filling some aliases then move the markers to those aliased object locations. That's a slick idea. You could use a combination of GetHeadingAngle and GetDistance requirements to pull stuff within certain specific sectors, then move the markers to those aliases. You could still run into issues with potentially inaccessible markers in extreme cases (e.g. near a cliff) but maybe a check for major Z-axis deviations w.r.t. the player? Yes, the best part is you can place all sorts of conditions on the quest aliases and then the quest system will quickly and efficiently pick something that matches (if possible). All of the aliases should be marked optional just in case it can't find a marker and then your script to move the markers can decide how to adapt the placement. Personally if I were planning to use 4 markers I would probably set up 6-8 aliases to have some choices if one or more can't be filled because a particular direction is inaccessible. Things like a line-of-sight check can be helpful too. Link to comment Share on other sites More sharing options...
Tasheni Posted November 14, 2017 Author Share Posted November 14, 2017 Thank you both for the quick replies. I think I understand. You can't spawn markers but you can move them. Set up your packages to use a set of markers you place as persistent objects in some holding cell. Then you can use a script to move the markers to new locations.Alright, dummycell is already there, package with the markers attached, that's the easy part. Is there a tutorial that can teach me how to move markers with a script? Or a similar script already in game? If you set the packages to use a fairly wide radius to determine if they've made it to the marker it should generally work to just put the markers somewhat randomly around the player. Better yet you can use a quest to search for random nearby things (bushes, trees, rocks, flora, and even markers) by filling some aliases then move the markers to those aliased object locations.This sounds like a very good idea and will open some nice capabilities. Setting up the quest this way will not be too complicated for me, with the scripting part I will surely get a headache :) I will start trying this and come back when getting stuck.Otherwise - if someone is in the mood for writing the script for me...Hey, that's a joke! As I'm pretty much able to understand the logic behind scripts, the syntax is driving me crazy. But I'm tough. I will master this lesson.Thanks for helping. Greetings from Tasheni Link to comment Share on other sites More sharing options...
Recommended Posts