-
Posts
520 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by shavkacagarikia
-
xmarker orientation question
shavkacagarikia replied to jaysaunders78's topic in Fallout 4's Creation Kit and Modders
Why not to rotate it manually after it is spawned? Just listen for that objects onload, and use setangle for rotation. -
Get reference to current companion
shavkacagarikia replied to SKKmods's topic in Fallout 4's Creation Kit and Modders
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. -
Detecting Transfer Window
shavkacagarikia replied to MegaStorm's topic in Fallout 4's Creation Kit and Modders
use this event: https://www.creationkit.com/fallout4/index.php?title=OnMenuOpenCloseEvent_-_ScriptObject -
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)
-
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.
-
Manipulating Inventory Items
shavkacagarikia replied to MegaStorm's topic in Fallout 4's Creation Kit and Modders
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. -
No GetCameraState, I take it?
shavkacagarikia replied to Asterra's topic in Fallout 4's Creation Kit and Modders
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. -
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.
-
OnHit clarification request
shavkacagarikia replied to FlashyJoer's topic in Fallout 4's Creation Kit and Modders
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 -
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)
-
Detect whether player is indoors?
shavkacagarikia replied to ScottyDoesKnow's topic in Fallout 4's Creation Kit and Modders
you can check it with: Game.getplayer().IsInInterior()oops, it seems I'm bit late :D -
Playing hkx/hkt animations in game?
shavkacagarikia replied to felixk4's topic in Fallout 4's Creation Kit and Modders
Yes. If its just idle place it in LOOSE section. -
Many animevents just dont fire when you register for them, so dont be surprised. Most likely thats one of them.
- 2 replies
-
- creation kit
- script
-
(and 4 more)
Tagged with:
-
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
- 6 replies
-
- creation kit
- fallout 4
-
(and 3 more)
Tagged with:
-
How to properly use RemoveAllItem()?
shavkacagarikia replied to hxhunter15's topic in Fallout 4's Creation Kit and Modders
Most likely you have respawn flag checked on your container. Uncheck it.- 20 replies
-
Freeze actor value
shavkacagarikia replied to grestl's topic in Fallout 4's Creation Kit and Modders
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. -
Apply magic effect to actor via script?
shavkacagarikia replied to FiftyTifty's topic in Fallout 4's Creation Kit and Modders
If you set type of the spell to ability, it will run needed magic effect on actor as soon as added. -
Get reference to current companion
shavkacagarikia replied to SKKmods's topic in Fallout 4's Creation Kit and Modders
GetPlayerFollowers will return array of current companions. Then you can cycle through it and do stuff for each of them individually -
Controling player in a scene?
shavkacagarikia replied to saintgrimm92's topic in Fallout 4's Creation Kit and Modders
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 -
teleport npc into furniture
shavkacagarikia replied to Deleted47472148User's topic in Fallout 4's Creation Kit and Modders
You can snap actor in furniture with SnapIntoInteraction() function