-
Posts
1192 -
Joined
-
Last visited
Everything posted by fg109
-
Change the enchantment's magic effect to a script archetype. Attach this script to it: Scriptname ExampleMEScript extends ActiveMagicEffect Spell Property Paralyze5SecsOnSelf Auto Event OnEffectStart(Actor akTarget, Actor akCaster) Paralyze5SecsOnSelf.Cast(akTarget) EndEvent
-
I'm going to assume that the skull is the activate parent of your trap, and that's how your trap is triggered. Scriptname atestSkullText extends ObjectReference Message property box1 auto {Are you sure you want to dishonor the dead? Y/N} Message property box2 auto {Fool! Leave my remains alone!} Message property box3 auto {Stop it or I will kill you} Message property box4 auto {Now you die!} Function TurnSkull(Float Angle = 180.0, Float Speed = 180.0) ;Angle = how many degrees to turn it clockwise (default 180) ;Speed = how fast to turn it in degrees per second (default 180) Angle += GetAngleZ() if (Angle > 180) Angle -= 360 elseif (Angle < -180) Angle += 360 endif TranslateTo(X, Y, Z, 0, 0, Angle, 1024.0, Speed) EndFunction Event OnCellAttach() StopTranslation() BlockActivation() SetMotionType(4) MoveToMyEditorLocation() GoToState("Waiting") EndEvent State Waiting Event OnActivate(ObjectReference akActionRef) int choice = box1.Show() if (choice == 0) ;the first choice GoToState("Busy") TurnSkull() Activate(akActionRef, True) endif EndEvent EndState State Busy Event OnActivate(ObjectReference akActionRef) Debug.Notification("Still busy turning.") EndEvent Event OnTranslationComplete() GoToState("Waiting") EndEvent EndState
-
&& means AND, || means OR So in the original script, if prereqStageOPT == -1 || preQuest.getStageDone(prereqStageOPT) == 1 means "if prereqStageOPT is -1 (which means it was left at default, unchanged) or if preQuest has finished prereqStageOPT". In the modified script, if (prereqStageOPT == -1 || preQuest.getStageDone(prereqStageOPT) == 1) && (prereqStageOPT02 == -1 || preQuest02.getStageDone(prereqStageOpt02) == 1) means "if (the stuff from before) AND (the new stuff)". If both stages are from the same quest, and you only want to use one preQuest property, use this: f (prereqStageOPT == -1 || preQuest.getStageDone(prereqStageOPT) == 1) && (prereqStageOPT02 == -1 || preQuest.getStageDone(prereqStageOpt02) == 1)
-
Like jet4571 says, I think that disabled objects would not affect the GPU at all, and will only affect the CPU if you happen to have a lot of them running scripts at the same time. For example, I just did a test with PlaceAtMe and Delete. I tried creating 5000 coins one at a time but after around 750 it slowed down and my game got really jerky. By 1000, it was only creating about 1 coin per second. Eventually, it froze my game before it got finished. Then I set the parameters for PlaceAtMe so that they spawned initially disabled and it worked, spawning coins at a constant rate the whole time. BTW, my results are that Delete works reliably, all 5000 of the coins got cleaned up.
-
Your post is very confusing. Please list step by step what you want to happen.
-
1. Add a quest property for your second prerequisite quest (eg preQuest02). 2. Add an int property for the prerequisite stage of preQuest02 (eg prereqStageOPT02) initialized to -1. 3. Edit this line in the script: if prereqStageOPT == -1 || preQuest.getStageDone(prereqStageOPT) == 1 to this: if (prereqStageOPT == -1 || preQuest.getStageDone(prereqStageOPT) == 1) && (prereqStageOPT02 == -1 || preQuest02.getStageDone(prereqStageOpt02) == 1)
-
Issue enabling Persistant References by Parent
fg109 replied to Ghaunadaur's topic in Skyrim's Skyrim LE
I suggest looking at how the vanilla player houses are set up. For example, Breezehome has a couple of weapon plaques that are only enabled when you buy upgrades, and they work fine. That said, did you remember to set the enable parent for both the activator and the trigger? -
Scriptname kazanRotateSkull extends ObjectReference Auto State Waiting Event OnActivate(ObjectReference akActionRef) GoToState("Busy") SetMotionType(4) TranslateTo(X, Y, Z, 0, 0, akActionRef.GetAngleZ(), 1024.0, 15.0) EndEvent EndState State Busy Event OnTranslationComplete() GoToState("Waiting") EndEvent EndState This is assuming that the orientation of the skull is the same as the player. (EG if the player and the skull have the same Z angle, they are facing the same direction)
-
Papyrus Scripting: Enabling and Disabling Objects
fg109 replied to hfreeman's topic in Skyrim's Skyrim LE
You need to read up on properties. If that page doesn't make sense, basically you can't reference anything directly in a script. You have to create variables known as properties. You use these properties anywhere you want to reference anything. After you compile your script, you can edit the properties so that they point at what you want. Quest stage script fragments are actually functions in your quest's quest fragments script. You cannot use properties in your quest stage script fragment until you add it to the quest fragments script. If you don't have any quest stage script fragments yet, then you don't have a quest fragments script for your quest. So you should first compile a quest stage script fragment with just a semicolon ";" to generate the quest fragments script, add your properties to the quest fragments script, then edit the quest stage script fragment with your real code. -
the currency system needs a revamp... here's how
fg109 replied to jakdaryper's topic in Skyrim's Skyrim LE
You could do that... but there are lot a of instances where gold is given, and doing it that way won't account for quests from mods. I'd just rename gold to "copper", and put a script on the player to keep track of how much "copper" he/she has. For every 100 "copper" the player has, I'd automatically replace it with one "silver", and for every 100 "silver", replace it with one "gold". -
Decorator Assistant - Requires Script Dragon Decorator Assistant - SKSE and Vanilla Versions
-
It is possible to remove all vanilla abilites/diseases/spells and such from the player with a script. It is possible to remove all equipped spells from the player with a script. It is not possible to remove all non-vanilla abilities/diseases from the player with a script, even using SKSE. It is possible to remove the player's quest items via scripting. GetKnockedState is not part of the Papyrus scripting language.
-
Regarding the larger problem, you can use AddForm to add a form to leveled item lists. There's the problem that the changes don't persist through game loads, but there is a way for detecting a newly loaded game on the same page under examples (courtesy of JustinOther). If they ever fix AddForm so that it persists through game loading, then this will no longer be a problem. If AddForm doesn't get fixed, then you can still exploit it to figure out when the game loads and to use AddForm on the lists you want again. Example Script:
-
Event OnActivate(ObjectReference akActionRef) if akActionRef == PlayerRef ;do stuff endif EndEvent Actor Property PlayerREF Auto There's no way to filter the activation events to only fire depending on who/what is doing the activating.
-
If you were going to set up your quest like the blacksmithing tutorial, you could do it. Well, I haven't taken a look at it, so I can only guess. The way to do it would be through an OnItemAdded event in a script placed on the player (through a reference alias perhaps). Then you would be able to test each item that gets added to see whether it's an iron dagger, and then whether or not it's been tempered. And when that happens, you set a flag on your quest to enable the dialogue that's supposed to happen when the player has a tempered dagger. Obviously, this could have a lot of problems such as exactly when you should fill the reference alias with the player, the impossibility of finding out whether or not the player already has a tempered dagger, etc... Actually, maybe there is a way. You could have a custom container somewhere, and when you need to check the player for a tempered dagger, you silently remove daggers from the player's inventory one at a time. The custom container would be scripted with the OnItemAdded event to check if any of the daggers have been tempered. Then after the process is over, all the items are silently added to the player again.
-
An item that has been tempered will have its health increased. You can check its health with GetItemHealthPercent. I don't know of any way you would do this through conditions though... How would you get the condition to run on the daggers?
-
NPC keeps repeating dialogue and messages disappear too fast.
fg109 replied to RyanYTH's topic in Skyrim's Skyrim LE
shadeMe created an SKSE plugin that would play a silent wav file if there is no associated wav for a line of dialogue (similar to Elys' Silent Voice for Oblivion. I don't remember where I got it, but it's called "Fuz Ro D'oh". -
Did you remember to set your properties? If you named your properties the same as the global variables, then you can just push the "auto-fill all" button. Something you might want to consider is that each city and each interior is its own world space, with its own set of coordinates.
-
When you name your file, end it with .psc
-
All code needs to be contained within functions or events. This is a working example of using IsKeyPressed: Scriptname Example extends Quest import Input Event OnInit() RegisterForSingleUpdate(0.1) EndEvent Event OnUpdate() if (IsKeyPressed(0x57)) Debug.MessageBox("You stopped the quest.") Stop() else RegisterForSingleUpdate(0.1) endif EndEvent
-
You realize that it would only work if you happen to be pressing the F11 key when you call the MsgMe() function right? Do you know how to call functions?
-
Your script shouldn't extend Input, have it extend something else. Import Input. Create a property for gold.
-
This is possible, but it is a little complicated because of the notes on the UseMagic procedure. An additional complication that is not noted is that if an NPC evaluates to the same package twice in a row, he/she gets stuck until that package is no longer valid. (I wasn't sure whether or not this is only for UseMagic packages so I didn't put it up there.)
-
That script is meant to be put on the container or NPC that receives the item, not the item itself. Just making sure you know that.
-
@scrivener07 I noticed you put that up on the wiki's example scripts. I tried to change it but you changed it right back. :turned: Anyway, that first line should be if (akSourceContainer == Game.GetPlayer()) otherwise you're just assigning the player to the akSourceContainer variable.