Jump to content

dagobaking

Premium Member
  • Posts

    235
  • Joined

  • Last visited

Everything posted by dagobaking

  1. Hello. Maybe this is not possible. I am trying to use Papyrus to make the Player character walk to a specific position determined via Papyrus. This is the code I'm testing with: ObjectReference f = PlayerRef.PlaceAtMe(marker) f.waitfor3dload() f.SetAngle(0.0, 0.0, f.GetAngleZ()) float cX = f.GetPositionX() float cY = f.GetPositionY() float cZ = f.GetPositionZ() float nX = cX + 200 float nY = cY + 200 float nZ = cZ f.SetPosition(nX, nY, nZ) Debug.Notification("Current: " + cX + ":" + cY + ":" + cZ) Debug.Notification("New: " + nX + ":" + nY + ":" + nZ) Debug.Notification("WalkingTo: " + PlayerRef.PathToReference(f, 0.5)) When it runs, I can see that the marker object does get created and placed properly. But, the player character doesn't walk to it. Any ideas? Do I need to disable player controls first? Does this even work on the player character or NPC only? Thank you for any help.
  2. Thank you! Looks 10 times easier than the process/tools for Skyrim.
  3. Would you mind posting a snippet of code showing how you get those Actors set up? I just tried switching to individual reference aliases and am getting the same issue. The actors are successfully added to the alias. But, "GetCurrentPackage" does not equal the package I'm trying to run. So, I must be missing some step... Do you have to populate the referencealiases with the actors base object or something?
  4. Thank you. I set the package to have the relevant owner quest. But, that didn't change anything. I am running EvaluateAll on the RefCollectionAlias after populating it. That is supposed to run EvaluatePackage on all Actors in the collection. One thing that it sounds like I am doing differently than you is using the RefCollectionAlias instead of individual aliases. This is because I want to apply the package to a group of actors of variable size. But, maybe setting a package to a RefCollectionAlias doesn't work because it tries to apply to basically an array? Have you tried setting up packages on RefCollectionAlias'?
  5. This should be doable by moving the body away somewhere and placing a custom object in your inventory representing the body. Then, when you equip the item it would remove the item from your inventory and move the body to wherever you are. I would give it a crack. But, have my own mod obstacles I'm trying to figure out. Hopefully, my summary inspires you to give it a shot. It shouldn't take much.
  6. Hello. I am trying to apply a simple "Wait" package to Actors to make then stop what they are doing and hold still until the package is removed. I added the package to a RefCollectionAlias within a Quest. I am able to add an Array of Actors to the RefCollectionAlias. I verified this by tracing the size of the collection and that looks like it is working. However, it doesn't look like the package is being applied. The Actors just continue sandboxing or walking around. I have two guesses as to the cause: 1) The package is not being applied to the actors in the collection at all because there is some other step I need to take to activate it? or 2) The package is added. But, other packages already running on the actors are taking priority. --- Does anyone know how to accomplish what I'm trying to do? What is the easiest way to apply a new package to an Actor or group of Actors? Does anything need to be done to make sure that your package runs over any others? Do I need to have a condition in the package to make it work? I currently have no conditions set.
  7. Have you checked out the F4SE C++ source? My experience is that there are only a few people out there with this knowledge and they aren't very responsive to questions. Maybe moved on from the game?
  8. I've set some NPC Actors to Unconscious = true so that they will stay in a furniture interaction. However, this closes their eyes. Any ideas on how to have them look awake while in this state?
  9. Thank you! That helped. I had tried RegisterForRemoteEvent. But, I was listening to the playerRef. So, thought it should be on "Actor.OnCellLoad". When I changed it to ObjectReference it worked. Good to know about not firing on loaded cells. Will test to see how it goes. Doesn't need to be precise for my use.
  10. I see the OnCellLoad Event. But, I'm not sure how to set it up so that it runs a function on my Quest script. On the quest script, I have: Event OnCellLoad() Debug.Notification("New Cell Loaded") endEventThis gives a compile error. Any ideas?
  11. Any reason in particular? I work with FormLists frequently so want to make sure I'm not missing something useful. Also, if not already aware, you should know AddForm adds/prefixes at index 0 every time instead of appending. I flipped a few tables over this until I realized what was happening. See lines 107, 155, 225: https://pastebin.com/mSH8pJ6L i = 6 ; IMPORTANT: AddForm adds every new element at index ZERO! So add forms BACKWARDS to match globals list! While i >= 0 pDCS_Flst_Outfit_XautomatronX.AddForm(AutomatronOutfits[i] as Form) i -= 1 EndWhile If pDCS_Global_DevTracking.GetValue() == 1 Debug.Notification("DCS: Automatron handled.") EndIf My mod uses lists/data from xml files so that it can be expanded with modules without having to change the main mods files. That may be possible in some way with Papyrus/CK only. But, I found it very unwieldy. In the case of this list, to be honest, I'm just being a perfectionist. It is actually decoupled enough because I can still populate the list with data from the xml. Just, as a pattern, I'm avoiding entanglements with CK references as much as possible. Thank you for the note about the add order. The formlists I'm using so far don't need a particular order. But, I could see myself easily getting hung up by that later.
  12. Thank you. My example was misleading. I am not trying to create an array of FormLists. I'm trying to simply populate a FormList that wasn't created as a property. So: FormList myList Function addToList(Form myForm) myList.Add(myForm) Debug.Notification(myList.GetSize()) EndFunctionThat results in a "0" notification when the addToList function is ran. But, if I set "myList" up as a property, it works. I was guessing that maybe I needed to instantiate the FormList like an array first. But, maybe what I'm trying to do is not possible at all in Papyrus. Maybe the engine needs to allocate space for it via a property...? Thank you. I initially tried it that way "FormList list". But, adding forms to that list didn't change the size of the list. When I change it to a property and set it up in CK, it then works... Thank you. I think that would work. But, I'm trying to avoid having a CK FormList at all. I'm wanting to decouple the data side of this mod from CK as much as possible.
  13. I know that I can set up a FormList as a property in a script and use it that way. But, I would like to make one like this: FormList list = new FormList[0] list.AddForm(myForm)But, I get a compile error for that. I tried variations in syntax that I could think of and couldn't get it to work. Any ideas?
  14. Thank you for taking a look. I tried using that to "unfreeze". But, it didn't work. It turned out to be something else (see below). Thank you. That is a helpful reference script for this type of thing. It turns out that I was misunderstanding the cause of the problem. I was setting the player character to "Unconscious". That was (logically) disabling camera controls. So, I was able to get it all working properly once I removed that call. Interesting. I'm having a similar issue with characters sometimes getting stuck in furniture. It's rare enough that I'm going to move on to other things for now. But, I would be interested to hear any solution you come up with as I might need it also. I see you make use of changing the ini settings for the spin effect. I've picked up a few of those ini commands from looking at other mods. But, it would be great to have a reference that explains all the settings available. Does such a reference exist? The wiki site has a page for INI settings. But, it doesn't seem to cover them all.
  15. I am trying to use Papyrus to snap the player character into a furniture interaction. t works fine on NPC Actors. But, when I run "playerRef.SnapIntoInteraction(customFurniture)" it temporarily fades the camera to black. Then when it fades back in, the player is in the right place, but the camera controls are frozen. Does anyone know a way to do the snapintointeraction on the player and maintain camera controls?
  16. Update: I created a "blank" NPC character and tried attaching to that. Didn't work. So, I decided to take a step further back and try simply attaching to any existing NPC in the game. That doesn't seem to work either: actorOne.setVehicle(actorTwo)Is there some flag or marker that needs to be set on an Actor in order for this function to work? Has anyone used setVehicle with success at all?
  17. Hello. In Skyrim, the setVehicle function allowed you to attach an actor to an ObjectReference. This could be used to attach characters to blank Static objects in order to lock that character into place and prevent them from moving due to collisions, clipping and so on. However, in Fallout 4, setVehicle requires attaching to an Actor instead of an ObjectReference. Is there a way to mimic the effect achieved in Skyrim with this new function? I have tried "myStaticObjectReference as Actor" but that returns "None". Is there a way to make a "blank" actor to attach actual actors to? Thank you for any help.
  18. I would love to use this. But, for me it immediately crashes the game... Is an update needed again?
  19. Hello. I'm working on a mod that will generate procedural, random qualities to make NPCs more interesting and different every play through. One big missing piece though is a way to save a text file from Papyrus. Skyrim had an SKSE utility plug-in that took care of this. But, I haven't seen the equivalent in Fallout yet. Is there an F4SE plug-in that does this already? If not, anyone with C++ experience that is up to making one? I think it would be a super easy script. Probably just a few lines. But, I know very little C++.
  20. Thank you both. I did some more testing by traveling out of the workshop area and running this function on other NPCs. That traced those references as "Actor". But, the result still wasn't as expected. So, it looks like casting the objectreference was working. It's just that the "SetCameraTarget" function didn't do what I thought it would. I expected it to aim the players first person camera toward the target. It looks like it changes the camera position only in third person view. And in a kind of un-useful way... Anyone know if there's a way to point the camera at another actor like I was trying to do?
×
×
  • Create New...