Jump to content

Elias555

Members
  • Posts

    792
  • Joined

  • Last visited

Posts posted by Elias555

  1. I tried this but it's not adding the enchantment to the shield.

    Scriptname _AceTestingScript extends ActiveMagicEffect
      
    
    Enchantment Property MyEnchantment Auto
    
    
    Event OnEffectStart(Actor akCaster, Actor akTarget)
    
    	Armor EquippedShield = Game.GetPlayer().GetEquippedShield()
    	EquippedShield.SetEnchantment(MyEnchantment)
    
    EndEvent
    

    Wiki:

     

    Sets the enchantment associated with this armor. Note refers to the base object, not an object reference.

    Not sure what that means exactly.

     

    Edit: It is adding the enchantment but not the visuals for some reason. I can see the visuals in the menu or when I drop the shield but not while equipped.

    Edit2: The enchantment effect isn't working either, just the visuals when on the ground and in the inventory.

     

    It's fairly straightforward. You have the constant magic effect that goes into the armor enchantment, around the top right of the magic effect window you can link a perk. The perk will be added while the effect is active.

     

    In that perk you use the "Apply Combat Hit Spell" entry (adds effect to target when you succesfully hit him with a melee weapon and whatever conditions you have are met). Point it to a contact fire and forget magic effect with fire or whatever (edit: actually you point it to a spell containing said magic effect). Add condition that the armor piece is equipped to be safe in case it isn't properly removed, optionally add other conditions to make it more interesting like only on power attacking or sneaking, stuff like that. You can condition different perk entries (and therefore effects) to different directions of power attacks which is pretty cool but I can't recall the specifics of that.

     

    I believe this has the potential to conflict with other perks using that entry point in that only one spell will be applied to the target in a hit, if all have a few conditions this shouldn't be a problem.

    Thanks for that, it'll come in handy for something else.

  2. Enhance weapon applies an enchantment to a weapon for the duration of the spell or until sheathed. My application will be for a shield and I want to have that same control, including the visual changes that comes with an enchantment.

     

    I've used that in armor to add fire damage to weapons in addition of their enchantment.

    https://www.creationkit.com/index.php?title=Perk_Entry_Point

    That sounds interesting. How did you do that exactly?

  3. Is there a way to use the enhance weapon magic effect but only apply it to shields/armour? If not, is there a workaround method of getting it done? I saw the SKSE function SetEnchantment but I think that's permanent. I guess I could listen for unequipping/moving containers but I'm hoping there's a better method.

     

    Editing this post so you don't have to read the whole thread to get up to date. I'm making an enhance shield spell but I've run into some trouble.

     

     

    This script applies the enchantment to the current equipped shield. It's in the magic effect.

    Problems:

    Doesn't re-equip the shield once the spell runs out.

    Enchantment shader only plays while in an inventory or on the floor.

     

     

     

    Scriptname _AceTestingScript extends ActiveMagicEffect
      
    Enchantment Property MyEnchantment Auto
    
    Armor EquippedShield
    Armor BaseShield
    
    Event OnEffectStart(Actor akCaster, Actor akTarget)
    
    	WornObject.SetEnchantment(Game.GetPlayer(), 0, 0x00000200, MyEnchantment, 1000)
    	BaseShield = Game.GetPlayer().GetEquippedShield()
    	EquippedShield = Game.GetPlayer().GetEquippedShield()
    	Game.GetPlayer().UnequipItemEX(EquippedShield, 2, False)
    
    EndEvent
    
    
    
    Event OnEffectFinish(Actor akCaster, Actor akTarget)
    
    	Game.GetPlayer().RemoveItem(EquippedShield, 1, True)
    	Armor ReplacementShield = Game.GetPlayer().Additem(BaseShield, 1, True)
    	Game.GetPlayer().EquipItemEX(ReplacementShield, 2, False) ;NOT WORKING
    
    EndEvent
    
    

     

     

     

    This magic effect is responsible for removing the enhanced shield effect if the player decides to unequip the shield before the spell ends.

    Problems:

    Switching to a spell or dropping the weapon doesn't count as unequipping

    It has a while loop.

     

     

     

    Scriptname _AceTestingScript2 extends ActiveMagicEffect
    
    Armor BaseShield
    
    Event OnEffectStart(Actor akCaster, Actor akTarget)
    
        BaseShield = Game.GetPlayer().GetEquippedShield()
        Armor EquippedShield = Game.GetPlayer().GetEquippedShield()
        
        While Game.GetPlayer().GetEquippedShield() == EquippedShield
    
            Debug.Notification("shield is equipped")
    
            If Game.GetPlayer().GetEquippedShield() != EquippedShield
    
                Game.GetPlayer().RemoveItem(EquippedShield, 1)
                Game.GetPlayer().Additem(BaseShield, 1)
    
            EndIf
    
        EndWhile
    
    EndEvent

     

     

  4. Posting here for future reference. It sounds like the CK is wired to override aim to the player controller. Damn, that's dumb. Please do tell if anyone ever finds a better solution. Thanks for doing the hard work for the rest of us.

    Huh? The post above yours shows how I scripted it in the end. It all worked out. You just place an activator above the actor and force the actor to fire to it/have an activator fire to it.

  5. That had the same problem as the updated script from page one but I appreciate the effort. The script above(comment 15) works well with 1 exception. When the player is standing in the way of the fake activator it doesn't get swapped with the real activator. Not sure how to fix that other than preventing the player from moving which I don't want to do.

  6. So it communicates the position to TranslateRef? I see.

    I tried your code above and once again nothing was visible.

     

    Edit: Made a few changes and this placed it and moved correctly but once again the 'activator' was in the position of moveto and not with the nif.

    
    
    Event OnEffectStart(Actor akTarget, Actor akCaster)
    
    
    ObjectReference EndPoint = akCaster.Placeatme(xMarkerActivator)
    EndPoint.MoveTo(akCaster, 120.0 * Math.Sin(akCaster.GetAngleZ()), 120.0 * Math.Cos(akCaster.GetAngleZ()), akCaster.GetHeight() - 50.0, true)
    
    ObjectReference MyStew = akCaster.Placeatme(MyActivator)
    MyStew.SetPosition(120.0 * Math.Sin(akCaster.GetAngleZ()), 120.0 * Math.Cos(akCaster.GetAngleZ()), akCaster.GetHeight() + 335.0) 
    MyStew.MoveTo(akCaster, 120.0 * Math.Sin(akCaster.GetAngleZ()), 120.0 * Math.Cos(akCaster.GetAngleZ()), akCaster.GetHeight() + 335.0, true) 
    Utility.Wait(0.5)
    MyStew.TranslateToRef(EndPoint, 45)
    
    EndEvent
    
  7. I did try something like that during my testing but using setposition didn't place anything as far as I could see. I tried using getposXYZ and that didn't work either. But here's what worked.

    Hopefully someone will find this useful one day.

    Scriptname _AceTestScript extends ActiveMagicEffect  
    
    
    Activator Property MyActivator Auto  
    Activator Property xMarkerActivator Auto  
    Activator Property RealStew Auto  
    Explosion Property MyExplosion Auto
    
    ObjectReference EndPoint
    ObjectReference MyStew
    ObjectReference NewStew
    
    Event OnEffectStart(Actor akTarget, Actor akCaster)
    
    
        EndPoint = akCaster.Placeatme(xMarkerActivator)
        EndPoint.MoveTo(akCaster, 120.0 * Math.Sin(akCaster.GetAngleZ()), 120.0 * Math.Cos(akCaster.GetAngleZ()), akCaster.GetHeight() - 50.0)
        EndPoint.SetAngle(0.0, 0.0, 0.0)
        MyStew = akCaster.Placeatme(MyActivator)
        MyStew.MoveTo(akCaster, 120.0 * Math.Sin(akCaster.GetAngleZ()), 120.0 * Math.Cos(akCaster.GetAngleZ()), akCaster.GetHeight() + 335.0)
        MyStew.SetAngle(0.0, 0.0, 0.0)
        Utility.Wait(0.5)
        MyStew.TranslateToRef(EndPoint, 165)
    
        RegisterForSingleUpdate(0.3)
    
    EndEvent
    
    Event OnUpdate()
    
        If MyStew.GetPositionZ() == EndPoint.GetPositionZ()  
        
            NewStew = EndPoint.Placeatme(RealStew)
            Utility.Wait(0.5)
            MyStew.Disable()
            MyStew.Delete()
            EndPoint.Disable()
            EndPoint.Delete()
    
        ElseIf MyStew.GetPositionZ() != EndPoint.GetPositionZ()  
        
            RegisterForSingleUpdate(0.3)
    
        EndIf
    
    EndEvent
    
    
    Event OnEffectFinish(Actor akTarget, Actor akCaster)
    
        NewStew.PlaceAtMe(MyExplosion)
        Utility.Wait(0.2)
        NewStew.Disable()
        NewStew.Delete()
        MyStew.Disable()
        MyStew.Delete()
        EndPoint.Disable()
        EndPoint.Delete()
    
    EndEvent
    
    

    Sometimes MyStew doesn't get disabled and NewStew isn't created. Not sure why though. Everything else is fine.

  8. Not sure what you mean. This is my entire code. I still have to clean things up at the end.

    Activator Property MyActivator Auto  
    Activator Property xMarkerActivator Auto  
    Potion Property Stew Auto  
    
    Event OnEffectStart(Actor akTarget, Actor akCaster)
    
    
    	ObjectReference EndPoint = akCaster.Placeatme(xMarkerActivator)
    	EndPoint.MoveTo(akCaster, 120.0 * Math.Sin(akCaster.GetAngleZ()), 120.0 * Math.Cos(akCaster.GetAngleZ()), akCaster.GetHeight() - 50.0, true) 
    	ObjectReference MyStew = akCaster.Placeatme(MyActivator)
    	MyStew.MoveTo(akCaster, 120.0 * Math.Sin(akCaster.GetAngleZ()), 120.0 * Math.Cos(akCaster.GetAngleZ()), akCaster.GetHeight() + 335.0, true) 
    
    	Utility.Wait(0.5)
    	MyStew.TranslateToRef(EndPoint, 45)
    
    EndEvent
    
    

    Can I use Event OnTranslationComplete() to make a MoveTo or something from another event?

  9. I do though. It needs to be activateable at any point in the descent. Even if I make a swap when it gets to the position, that will cause the orientation(I did add true at the end ofEndPoint) to change and the swap will be visible.

     

    Edit:Something strange is going on. I CAN activate the object but the activation is not where it was placed or ends up, it's in the initial MoveTo position.

  10. I tried checking the BSXflags to mimic the nif that worked but all that did was make it freeze in place. I trimmed my code down to this. I didn't understand why that while loop was needed and it turns out it works without it.

    Activator Property MyActivator Auto  
    Activator Property xMarkerActivator Auto  
    Potion Property Stew Auto  
    
    Event OnEffectStart(Actor akTarget, Actor akCaster)
    
    
    	ObjectReference MyStew = akCaster.Placeatme(MyActivator)
    	ObjectReference EndPoint = akCaster.Placeatme(xMarkerActivator)
    	MyStew.MoveTo(akCaster, 120.0 * Math.Sin(akCaster.GetAngleZ()), 120.0 * Math.Cos(akCaster.GetAngleZ()), akCaster.GetHeight() + 335.0) 
    	EndPoint.MoveTo(akCaster, 120.0 * Math.Sin(akCaster.GetAngleZ()), 120.0 * Math.Cos(akCaster.GetAngleZ()), akCaster.GetHeight() - 50.0) 
    	MyStew.TranslateToRef(EndPoint, 45)
    
    EndEvent
    

    How do I make it static correctly?

  11. Try this and tell me what happens.

    Scriptname MMFTDruidSpellTreeDome extends MagicEffect
     
    activator Property akActivator  auto
     
    Event OnEffectStart(Actor akTarget, Actor akCaster)
    ObjectReference Tree1 = akCaster.PlaceAtMe(akActivator)
    ObjectReference Tree2 = akCaster.PlaceAtMe(akActivator)
    ObjectReference Tree3 = akCaster.PlaceAtMe(akActivator)
    ObjectReference Tree4 = akCaster.PlaceatMe(akActivator)
    Tree1.MoveTo(akCaster, 50, 50, 0)
    Tree2.MoveTo(akCaster, 50, -50, 0)
    Tree3.MoveTo(akCaster, -50, 50, 0)
    Tree4.MoveTo(akCaster, -50, -50, 0)
    EndEvent
    
  12. I couldn't get it to the position I want using setposition so I used moveto.

    Activator Property MyActivator Auto  
    Activator Property xMarkerActivator Auto  
    Potion Property Stew Auto  
    
    Event OnEffectStart(Actor akTarget, Actor akCaster)
    
    
    	ObjectReference MyStew = akCaster.Placeatme(Stew)
    	ObjectReference EndPoint = akCaster.Placeatme(xMarkerActivator)
    	MyStew.MoveTo(akCaster, 120.0 * Math.Sin(akCaster.GetAngleZ()), 120.0 * Math.Cos(akCaster.GetAngleZ()), akCaster.GetHeight() + 335.0) 
    	EndPoint.MoveTo(akCaster, 120.0 * Math.Sin(akCaster.GetAngleZ()), 120.0 * Math.Cos(akCaster.GetAngleZ()), akCaster.GetHeight() + 20.0) 
    	MyStew.TranslateToRef(EndPoint, 5)
    	While(MyStew.GetPositionZ() !=(akCaster.GetHeight() + 20.0))    
    		Utility.Wait(2.0)   
    	EndWhile 
    	EndPoint.MoveTo(akCaster, 120.0 * Math.Sin(akCaster.GetAngleZ()), 120.0 * Math.Cos(akCaster.GetAngleZ()), akCaster.GetHeight() + 20.0) 
    EndEvent
    

    Same thing happens, the stew is moved to the position and then plummets down. Does it have something to do with the nif?

     

    Edit:I just did a test with an item that doesn't have havok and it seems to work. I'll have to make a fake stew and test it out to know if it works with 100% certainty.

    Looks like the test nif did have havok checked in the nif but still floats when added into the game. I unchecked the stew nif and used the same activator but now it just floats in the air and doesn't move like with the test nif.

  13. Trying to pass an activator and a potion through PathToReference but I'm not sure how to do it. To clear things up:

    Potion Property Stew Auto  
    
    Event OnEffectStart(Actor akTarget, Actor akCaster)
    	
    	ObjectReference MyStew = akCaster.Placeatme(Stew)
    	MyStew.MoveTo(akCaster, 120.0 * Math.Sin(akCaster.GetAngleZ()), 120.0 * Math.Cos(akCaster.GetAngleZ()), akCaster.GetHeight() + 335.0) 
    	akCaster.PathToReference(MyStew, 0.5);akCaster needs to be replaced with an activator
    	
    EndEvent
    

    Right now the stew is created above the caster and then plummits down by gravity. I want to be able to control the descent.

  14.  

    I won't place all the ideas here, as I'm vastly protective of my ideas

    You haven't posted any. You have no leverage either. Not sure how you thought this was going to go down. Post some of your brilliant ideas and maybe you'll catch some fish. My suggestion would be to start with a few new powers and spells to gauge your unique and creative thinking.

  15. Nice idea with the globals. Neither putting the conditions in the magic effect nor the spell/ability seem to work.

    My conditions are GetGlobalValue >= 19 and GetGlobalValue <= 5

     

    Edit: Got it. Smaller value needs to be first and the first conditions needs to be OR. Thanks FF!

×
×
  • Create New...