azza1989 Posted April 22, 2012 Share Posted April 22, 2012 @AwesomeSkyrimDude You can find a list of all animation events by loading up the Creation Kit and then going through the menus: Gameplay -> Animations -> Actors\Characters\Behaviors\0_Master.hkx Then checking the animation events in the drop down menu to the right. For more information about scripting and animations, consider reading these three threads. @azza1989 Give the player an ability. The ability should have a magic effect, with the condition "IsSneaking == 1". The script attached to the magic effect will run every time the player starts sneaking. cheers mate, didnt think of that :) Link to comment Share on other sites More sharing options...
azza1989 Posted April 22, 2012 Share Posted April 22, 2012 @azza1989 Give the player an ability. The ability should have a magic effect, with the condition "IsSneaking == 1". The script attached to the magic effect will run every time the player starts sneaking. 1 more thing, not sure if this is quite possible - no one else could achieve this a script to add spendable perks? Link to comment Share on other sites More sharing options...
avenger404 Posted April 22, 2012 Share Posted April 22, 2012 Okay: Trying again. Another question: is it possible to make multiple runes be enabled simultaneously, be on a timer, and be disabled then re-enabled later on (by the same spell to re-enable them?) I ask this because it's apparently impossible for NPC's to place runes... Link to comment Share on other sites More sharing options...
fg109 Posted April 22, 2012 Author Share Posted April 22, 2012 @azza1989 If you mean a way to add perk points to the player, I think that there was a mod requiring Script Dragon that does it. I have no idea how to do it though. @avenger404 I haven't tried it so this is only a guess, but I think it's possible. You can place runes in the CK, and that makes them object references. If they're object references, then that means you can call Reset on them. Link to comment Share on other sites More sharing options...
marcaurelio745 Posted April 22, 2012 Share Posted April 22, 2012 Hi Fg109,is possible to have a script that return the nearest door?I would like to attach it to an NPC.Thanks Link to comment Share on other sites More sharing options...
Phnx Posted April 22, 2012 Share Posted April 22, 2012 (edited) @phnx Maybe there's something weird about the conditions, and you just can't use them to create new things... Try using just one condition: GetMovementDirection == 0 So the magic effect should become active whenever the player is standing still.Thanks again for the help! I have finally found a way of how to do what I wanted to do but it involves the use of console commands. Is there a way to run a script on game start?! :) Edited April 22, 2012 by Phnx Link to comment Share on other sites More sharing options...
kryptopyr Posted April 22, 2012 Share Posted April 22, 2012 I have a new question... Several quests that I'm working on involve certain timed events and delays. For example, I want to have a letter delivered to the player. Once the player reads it, I would like to have a second letter show up after 7 game days. I'm wanting to do this or something similar with a number of my quest ideas. My question is what is the best way to set up the time delay? Should I be concerned about a performance hit if I have a lot of scripts running timers? I currently have a container that I've scripted to reset after a certain number of days. I'm using Utility.WaitGameTime(72) to trigger the reset. Will using Utility.WaitGameTime() for periods of time covering several days or even weeks cause problems? Is there a better way to do it? Thanks! Link to comment Share on other sites More sharing options...
Nephilim722 Posted April 22, 2012 Share Posted April 22, 2012 hey fg109 I was refered to by someone to ask you for help. I am currently creating Nocturnals Cowl from Oblivion to put into skyrim and was hoping perhaps you could provide me with the scripting for its effects. I would greatly appreciate any help you could provide. Link to comment Share on other sites More sharing options...
fg109 Posted April 22, 2012 Author Share Posted April 22, 2012 @avenger404 I tried out what I suggested to you and it didn't work. Also tried using PlaceAtMe with the projectiles and that didn't work either. I guess that you can't actually dynamically create runes in the game using scripting. Instead, you could make some fake runes. Make some static object that uses the same nif as the real runes, then place them around your cell. For each rune, create a trigger (you can use the default blank trigger) and set it as the enable parent of the rune. Put this script on the trigger: Scriptname TriggerScript extends ObjectReference Explosion Property TrapExplosionRuneFrost01 Auto Event OnTriggerEnter() PlaceAtMe(TrapExplosionRuneFrost01) Disable() EndEvent And in your magic effect script, use this: Scriptname fg109TestME02Script extends ActiveMagicEffect ObjectReference[] Property Triggers Auto Event OnEffectStart(Actor akTarget, Actor akCaster) int index = Triggers.Length while (index > 0) index -= 1 Triggers[index].Enable() endwhile EndEvent Link to comment Share on other sites More sharing options...
fg109 Posted April 22, 2012 Author Share Posted April 22, 2012 @marcaurelio745 You would first have to create a formlist of all the doors in the game, then use this script: Scriptname Example extends Actor Formlist Property DoorsList Auto ObjectReference ClosestDoor ;some event/function ClosestDoor = Game.FindClosestReferenceOfAnyTypeInListFromRef(DoorsList, Game.GetPlayer(), 4096.0) if ClosestDoor Debug.Notification("Found the closest door.") else Debug.Notification("No door found anywhere in a one cell radius.") endif ;end some event/function @Phnx To run a script only once the first time you start the game with the mod loaded, just create a start game enabled quest, and put whatever you want done in the purl=http://www.creationkit.com/OnInit]OnInit[/url] event in the quest script. You can stop the quest afterwards with the Stop function. If you want to have the script run once every time the game is loaded, you would have to do something else. @kryptopyr I haven't done any tests to see whether the RegisterForUpdateGameTime is any better (in regards to script processing) than WaitGameTime, but I would go with registering for update. However, I doubt that using the WaitGameTime function would cause any harm. Keep in mind that the timing for these things can be off if you do something like sleep/wait/fast travel. Link to comment Share on other sites More sharing options...
Recommended Posts