Jump to content

shavkacagarikia

Premium Member
  • Posts

    520
  • Joined

  • Last visited

Everything posted by shavkacagarikia

  1. Why not to rotate it manually after it is spawned? Just listen for that objects onload, and use setangle for rotation.
  2. Lower down the afSpeed parameter value to around 100 and try that way
  3. While true and good, it doesn't find Dogmeat. It was unclear if the OP cares about Dogmeat or not. But I thought it should be mentioned. If using the alias method to find Dogmeat you would use Alias_FollowersQuest_DogmeatCompanion.GetReference(). Also if the player is using a mod to support multiple companions it won't work right. Depending how those mods are made they may have their own quest with a Ref Collection, or they may use some array elsewhere. I'm pretty sure thats because bethesda was planning to allow additional companion together with dogmeat initially.
  4. use this event: https://www.creationkit.com/fallout4/index.php?title=OnMenuOpenCloseEvent_-_ScriptObject
  5. Ok, so, that OnCellLoad is member of objectreference script and can't be used from script extending quest. you register for it remotely https://www.creationkit.com/fallout4/index.php?title=Remote_Papyrus_Event_Registration, or make new player alias, attach new script and use that event from there. BUT thats not reliable event for what you want, game usually holds some cells in memory, the ones you visited recently and even if you use load door, the cell you enter already can be in memory. So I wouldn't suggest to use that event. instead take a look at this workaround: https://www.creationkit.com/index.php?title=Detect_Player_Cell_Change_(Without_Polling)
  6. Just like guys suggested before me, but in case you have formlist form made and just dont want to make property and want to use that form in script. This is how you do it: FormList MyFormlistForm = Game.GetFormFromFile(0x0000F99, "MyCoolMod.esp") as FormList If MyFormListForm MyFormListForm.AddForm(MyCoolForm) Endif But properties are more efficient and faster Edit: I read your question again and clearly you dont want what I have answered, but I will leave it just in case someone wants something like this.
  7. Yeah you can't get specific reference of the form from container if that reference isn't persistent, or function you are calling isn't inventory safe. As usual there are workarounds depending on what and why you want to do that. You can iterate through player's items (but like f4se they will be forms) by calling removeallitems on player and moving those items in container where you have onitemadded event listener, then move those items back to player.
  8. There is a bool variable which you can query on character's animation graph. Game.GetPlayer().GetAnimationVariableBool("IsFirstPerson") Not as useful as skyrim's getcamerastate, but you can easily detect if player is in first person or not.
  9. Ok so workaround for you. Create a new ability spell. Create two magic effects, name them something like 1stpersoneffect and 3rdpersoneffect. Add those magic effects in that ability spell. Now you need IsPClstPerson condition function. Check for its true value for 1stpersoneffect and for its false value for 3rdpersoneffect. So when you switch to 1st person 1stpersoneffect will fire and when switch to 3rd person 3rdpersoneffect. You can have scripts on those magic effects and do whatever you want when they fire.
  10. Like thorald suggested. But other small suggestion, use type check instead of cast because its not needed. So for your code its better to have: If akTarget == PlayerREF && akSource is Explosion
  11. Yes it returns base ammo for that weapon form. Its because getequipped weapon returns weapon form and not specific objectreference which may have omod changing ammo type it uses. Nothing can be done with that and there is no direct way to do what you want. (There may be messy workarounds but nothing that can be easily done)
  12. you can check it with: Game.getplayer().IsInInterior()oops, it seems I'm bit late :D
  13. Yeah you arent the only one. I know at least two modders having same problem. Havent tested it myself though, but it seems broken for new version.
  14. Many animevents just dont fire when you register for them, so dont be surprised. Most likely thats one of them.
  15. you shouldn't use native keyword. You get errors because onunequipped is event of objectreference script. That means it should be called from that type of script objects. (The ones which extend objectreference) If you still want to use it from another type of object you can use remote event https://www.creationkit.com/fallout4/index.php?title=Remote_Papyrus_Event_Registration
  16. Using script is not a good way to modify actor values. For your case you should make a new enchantemt, then add value modifier type magic effect there which will modify needed avif by needed magnitude
  17. Most likely you have respawn flag checked on your container. Uncheck it.
  18. No direct way, there are messy workarounds. For example detect hit on player and set condition to 100 after each hit but I highly don't recommend doing so. There are some reasons, just believe me for now. If you want to nullify any damage on your limbs, you should make a new perk with "mod incoming limb damage" perk entry then multiply it to 0, and also on the left side you will see conditions where you can set when that entry should be functioning.
  19. If you set type of the spell to ability, it will run needed magic effect on actor as soon as added.
  20. GetPlayerFollowers will return array of current companions. Then you can cycle through it and do stuff for each of them individually
  21. There is a disableplayercontrols function in fo4 ck, its just part of the inputenablelayer script. You can take a look on how to use it here. https://www.creationkit.com/fallout4/index.php?title=DisablePlayerControls_-_InputEnableLayer Also if you want ai packages to run onplayer you should set player as ai driven with this function https://www.creationkit.com/fallout4/index.php?title=SetPlayerAIDriven_-_Game
  22. You can snap actor in furniture with SnapIntoInteraction() function
  23. There is no list, that means the function just takes float parameter, which you can pass when calling that function. You can left it blank when declaring if you don't want to pass anything there when calling.
×
×
  • Create New...