Jump to content

Noober1

Supporter
  • Posts

    20
  • Joined

  • Last visited

Posts posted by Noober1

  1. Hello! I'm working on a modded weapon that levels with the player in sense that it grows stronger the more you use it. For example, Im trying to see if there is a way that if this weapon is equipped, a script can track its kill counts and unlock perks when X amount of kills have been recorded.

     

    The particular weapon is a staff so I cannot add these perks to a perk tree and select them like you would any other weapon perk when you level up. Instead, the perks have been integrated into the staff's enchantment and parts of the enchantment kick into effect when certain perks have been unlocked.

     

    I know you can script counters with Int but have not seen any useful examples on how to implement it. Any advice would be greatly appreciated!

     

  2. I know this is WAY late of a response, but this just happened to me because I was an idiot! Wanted to put this out there for others.

     

    For anyone in the future needing to know how to fix without needing to reinstall game, and as far as I know, this only works if the floor/items/objects were marked as DISABLED not MARKFORDELETE is to:

     

    1. Open creation kit -> Create and save new plugin

    2. Select the Masters needed that contain the reference your trying to fix

    3. Go to the cell where the problem is and select the object. Again, if it has been DISABLED it'll still show up in CK, maybe MARKFORDELETED items as well (not sure really)

    4. Make sure you have the right object selected and right click it. Copy. and Paste in Place. Make sure to select Paste in Place and not just Paste so as to prevent any clipping or irregularities in game.

    5. Do this for all missing objects and hit SAVE

     

    Now! This fixes the problem, but if you have mods that change a town, you will want them to overwrite the mod you just made so make sure to place it higher than any of those mods.

    Load game, make sure your mod is enabled/ticked and enjoy the game play!!

  3. I fixed it!! In addition....I got it to fire the spell straight out instead of coming from below ground. I switched it back to Actor, readjusted the scripts/properties then tinkered around in the Race menu. Under General Data, one of the tick boxes, "Uses Head Track Anims" had to be ticked.

     

    So now the actor is spawned, turns toward any hostile enemy nearby, pelts them with firebolts and disappears after 60s. That is EXACTLY how I wanted this to turn out.

  4. Been messing around with it for a while now and for some reason after swapping it from an Actor to an Activator, both scripts compile but in game, the Sentry never spawns.

     

    I've made sure to update my properties afterwards as well. This is the script that is currently on the trap activator

     

    Scriptname WHA_SentryCombatScript extends ObjectReference
    import Utility
    Actor Property PlayerREF Auto
    Float Property xOffset Auto
    Float Property yOffset Auto
    Float Property zOffset Auto
    Float Property RandomOffsetX Auto
    Float Property RandomOffsetY Auto
    Float Property RandomOffsetZ Auto
    Float Property PulseRate = 1.0 Auto
    Float Property RandomRate Auto
    Activator Property TargetType Auto
    ObjectReference Property CurrentTarget Auto
    Bool Property SpawnNode Auto
    Spell Property WHA_SentryFirebolt Auto
    FormList Property TargetTypeList Auto
    Float Property SeekRange = 1000.0 Auto
    Actor Property Owner Auto Hidden ;the actor that spawned this sentry
    Float InitTime
    Event OnInit()
    InitTime = Game.GetRealHoursPassed()
    RegisterForSingleUpdate(PulseRate)
    EndEvent
    Event OnUpdate()
    Actor Target = Game.FindRandomActorFromRef(Self, SeekRange)
    if Target
    If Target.IsHostileToActor(Owner) ;only cast spell if hostile to owner.
    WHA_SentryFirebolt.Cast(Self,Target)
    Endif
    endif
    If ((Game.GetRealHoursPassed() - InitTime) > 0.016) || Self.IsDisabled() ==false
    Self.Disable()
    Self.Delete()
    Else
    RegisterForSingleUpdate(PulseRate + RandomFloat(0.0, RandomRate))
    Endif
    EndEvent
  5. That seemed to have worked but I have another odd issue. The object (or actor) I am summoning/placingatme is actually is a Dwemer Trap bow, the ones that fire giant bolts at you.

     

    I used its nif as the model for the actor. Its animations do not play but I am completely fine with that since I am having a firebolt fling from it. However, the firebolt originates from the very bottom of the model/nif which pokes just below the ground and 9/10 times the firebolt is fired below ground and just hits the floor mesh and not the actor.

     

    Is there anyway to place the actor higher off the ground when it is summoned or have to firebolt shoot higher? I imagine the latter is far less likely as that most likely has to do with the nodes in the nif file itself.

     

    I tried to mess with the randomoffset z property but I didn't see any effect no matter how high or low I set the number.

  6. Actually this is my script...not the above reference which was missing an Event.

     

    Scriptname WHA_SentryCombatScript extends ObjectReference
    import Utility
    Actor Property PlayerREF Auto
    Float Property xOffset Auto
    Float Property yOffset Auto
    Float Property zOffset Auto
    Float Property RandomOffsetX Auto
    Float Property RandomOffsetY Auto
    Float Property RandomOffsetZ Auto
    Float Property PulseRate = 1.0 Auto
    Float Property RandomRate Auto
    Activator Property TargetType Auto
    ObjectReference Property CurrentTarget Auto
    Bool Property SpawnNode Auto
    Spell Property WHA_SentryFirebolt Auto
    FormList Property TargetTypeList Auto
    Float Property SeekRange = 500.0 Auto
    Event OnInit()
    if CurrentTarget
    elseIf SpawnNode
    float newXOffset = XOffSet + RandomFloat(-RandomOffsetX, RandomOffsetX)
    float newYOffset = YOffSet + RandomFloat(-RandomOffsetY, RandomOffsetY)
    float newZOffset = ZOffSet + RandomFloat(-RandomOffsetZ, RandomOffsetZ)
    CurrentTarget = PlaceAtme(TargetType)
    CurrentTarget.MoveTo(Self, newXOffSet, newYOffSet, 500)
    endif
    RegisterForSingleUpdate(PulseRate)
    EndEvent
    Event OnUpdate()
    if !SpawnNode && !TargetTypeList && GetDistance(PlayerREF) < SeekRange
    CurrentTarget = PlayerREF
    elseif TargetTypeList
    CurrentTarget = Game.FindClosestReferenceOfAnyTypeInListfromRef(TargetTypeList, Self, SeekRange)
    endif
    if CurrentTarget
    WHA_SentryFirebolt.Cast(Self,CurrentTarget)
    endif
    RegisterForSingleUpdate(PulseRate + RandomFloat(0.0, RandomRate))
    EndEvent
  7. Hello! I've been working diligently on a mod that circling around 2 1h crossbows (the oldrim mod everyone by now has seen) and its coming along really well. I planning a D3 Demon Hunter style class and currently am working on a summon spell that summons a turret. When cast, the summon appears just find and turns to attack enemies but does not shoot any arrows or cast any spells. It has both arrows in inventory and spells added in spell list with plenty of magicka and skill offset to cast them. I looked into adding a script to force it to attack and it works, somewhat.

     

    What I have causes it to fire a firebolt at ANYONE (including the player) that is in range. I could live with that, though would optimally prefer it just attack hostiles, however the script stays in effect after the summon has disappeared/died. It just keeps firing off firebolts endlessly from the location the summon entered at. I used a 'Completed Script Example' from creation kit website and plugged in some of my Properties.

     

    Here's what I have so far....

     

    Scriptname WHA_SentryCombatScript extends ObjectReference
    import Utility
    Actor Property PlayerREF Auto
    Float Property xOffset Auto
    Float Property yOffset Auto
    Float Property zOffset Auto
    Float Property RandomOffsetX Auto
    Float Property RandomOffsetY Auto
    Float Property RandomOffsetZ Auto
    Float Property PulseRate = 1.0 Auto
    Float Property RandomRate Auto
    Activator Property TargetType Auto
    ObjectReference Property CurrentTarget Auto
    Bool Property SpawnNode Auto
    Spell Property WHA_SentryFirebolt Auto
    FormList Property TargetTypeList Auto
    Float Property SeekRange = 500.0 Auto
    Event OnUpdate()
    if !SpawnNode && !TargetTypeList && GetDistance(PlayerREF) < SeekRange
    CurrentTarget = PlayerREF
    elseif TargetTypeList
    CurrentTarget = Game.FindClosestReferenceOfAnyTypeInListfromRef(TargetTypeList, Self, SeekRange)
    endif
    if CurrentTarget
    WHA_SentryFirebolt.Cast(Self,CurrentTarget)
    endif
    RegisterForSingleUpdate(PulseRate + RandomFloat(0.0, RandomRate))
    EndEvent
    I recently got into scripting and am fairly new at it and would appreciate any help anyone could throw my way. Thanks

     

  8.  

    For Menus and Sub Menus I prefer to use functions. That way, you can specify which menu to go to and when. Example script:

     

     

     

    Message Property Message1 Auto 
    Message Property Message2 Auto 
    Message Property Message3 Auto 
    
    
    Event SomeEvent()
        Menu1() ;open main menu
    EndEvent 
    
    
    Function Menu1()
        Int Button = Message1.Show()
        
        If Button == 0
            ;do something 
        Elseif Button == 1
            Menu2() ;open sub menu 2
        Endif 
    EndFunction 
    
    
    Function Menu2()
        Int Button = Message2.Show()
        
        If Button == 0
            ;do something 
        Elseif Button == 1
            Menu3() ;open sub menu 3 
        Elseif Button == 2
            Menu1() ;go back to main menu
        Endif 
    EndFunction 
    
    
    Function Menu3()
        Int Button = Message3.Show()
        
        If Button == 0
            ;do something 
        Elseif Button == 1
            Menu2() ;go back to sub menu 2
        Elseif Button == 2
            Menu1() ;go back to main menu
        Endif 
    EndFunction 

    This works perfectly for a mod I am working on!!! Thanks for sharing!!!

  9. Hey guys.

     

    I'm looking to see if i can get some advice/help. In a mod i'm creating, I have a staff enchant that does multiple things. It causes fear when enemies are low enough on health, does extra damage to certain enemies, and also standard damage to all enemies.

     

    I'm attempting to have the staff also have a chance to cause explosions when hitting enemies that are feared. Using conditions, i am able to make all of this happen, however, the explosion FX never happens. I get the damage it is supposed to do but never the FX. Is this possible to do without scripts?

     

     

  10. Works beautifully. Thanks for the help man. :wink:

     

    Dunno why I didn't think of something like that. Guess I'm not as crafty as I once was.

    Hi. I'm trying to obtain a very similar effect as you with the cooldowns and was wondering what exactly you did to get yours to work

     

    I too cannot stand working with these scripts and cannot for the life of me figure them out. If you wouldnt mind could you tell me what and how you got it to work..

     

    Thanks

  11. Awesome...everything works good. But im having issues the last line....

     

    "addShouts" goes into the papyrus script located in my actor, or the 'player', under the actors tab?

     

    where would "teachWord" go? where is the 'game script'

  12. Hello, i recently started modding with the creation kit not long ago and have picked up the gist of the program fairly easy, however when it comes to actual scripting...I'm a complete noob (as my name suggests) =(

     

    What I'm trying to do is make it so a character automatically knows a shout and all the words to it, as well as them being unlocked, when they start a fresh game and that depending on what RACE they are will determine which of shout will be applied to them when they start up.

     

    Is this possible? Hopefully, yes.

     

    I've searched all over the web but there Isn't a whole lot of valuable information on scripting shouts and the Creation Kit online tutorials are less than helpful since most of the links you click on are so vague in description (that is if there even IS a description)

     

    Thanks in advance!!

×
×
  • Create New...