Jump to content

Quick Questions, Quick Answers


Mattiewagg

Recommended Posts

  • Replies 2.6k
  • Created
  • Last Reply

Top Posters In This Topic

I don't want to add them to the actor(s) in CK because they are TOO many actors.

I would have to take every Vampire/Werewolf NPC and add the perk to each one separately. It's a perk that makes an NPC/Player character immune to any damage source that isn't coming from Silver Weapons or Fire Damage.

Link to comment
Share on other sites

Since this will only rarely matter for anybody except the player, you could just give the player a perk that reduces all of his damage to 0 when attacking werewolves or vampires without silver weapons. NPCs don't have the smarts to switch to a different weapon anyway.
Link to comment
Share on other sites

Your followers aren't bright enough to switch weapons anyway. Unless you're planning to lower vampire and werewolf HP their damage calculation will remain the same anyway. It creates a lttle minigame for the player of making sure they carry the right equipment without creating the annoying situation where you have to swap all of your followers' equipment each time you hire a new person or enter a dungeon.
Link to comment
Share on other sites

 

 

Which slot is ammo such as an arrow or bolt located in when equipped for the sake of referencing in a script? Right hand, left hand or other?

Anyone?

I have no idea. I'd assume Other though.

Link to comment
Share on other sites

http://www.creationkit.com/InterruptCast_-_ObjectReference

 

How can I use this to cancel a spell that I'm trying to cast?

Add a script to your spell:

 

Event OnEffectStart(Actor akTarget, Actor akCaster)

     akCaster.InterruptSpell()

EndEvent
Or if you want to stop the player from casting any spells when a stage starts, just throw this in the quest stage:

 

PlayerREF.InterruptCast()

 

But from what I gather, it only interrupts the current cast so that wouldn't work in the quest stage if they didn't start casting at that very moment.

Link to comment
Share on other sites

 

Spell Property Blood auto
Spell Property Endurance auto

Spell Property SpellRefLeft auto
Spell Property SpellRefRight auto

Actor Property PlayerRef auto

Float Property MagickaCostRight auto
Float Property MagickaCostLeft auto

Spell Function GetEquippedSpell(int aiSource) native

Event OnObjectEquipped(Form akBaseObject, ObjectReference akReference)

akReference = PlayerRef

if akBaseObject as Spell
if PlayerRef.GetEquippedSpell(0) == akBaseObject as Spell
SpellRefLeft=akBaseObject as Spell
elseif PlayerRef.GetEquippedSpell(1) == akBaseObject as Spell
SpellRefRight=akBaseObject as Spell
endif
endif

if PlayerRef.GetEquippedSpell(0)==SpellRefLeft
MagickaCostLeft=SpellRefLeft.GetMagickaCost()
endif

if PlayerRef.GetEquippedSpell(1)==SpellRefRight
MagickaCostRight=SpellRefRight.GetMagickaCost()
endif

endevent

Event OnInit()
RegisterForUpdate(0.1)
EndEvent

Event OnPlayerLoadGame()
RegisterForUpdate(0.1)
EndEvent

Function InterruptCast() native

Event OnUpdate()

if PlayerRef.HasSpell(Endurance)==1

if PlayerRef.GetEquippedSpell(0)==SpellRefLeft && PlayerRef.GetActorValue("Stamina") PlayerRef.InterruptCast()
Debug.Notification("You don't have enough Stamina.")
endif

if PlayerRef.GetEquippedSpell(1)==SpellRefRight && PlayerRef.GetActorValue("Stamina") PlayerRef.InterruptCast()
Debug.Notification("You don't have enough Stamina.")
endif

endif
endevent


 

I found the solution in the meantime :D.

 

The one you posted works too!

 

On a completely different note though.. Are there only 10-20 people who actively mod that post on this forum? Lol, I swear I haven't seen more than that.

 

Scriptname ScriptChecker extends ObjectReference

Spell Property Blood auto
Spell Property Endurance auto
Spell Property SpellRefLeft auto
Spell Property SpellRefRight auto
Actor Property PlayerRef auto
Float Property MagickaCostRight auto
Float Property MagickaCostLeft auto
Float Property CastTimeRight auto
Float Property CastTimeLeft auto
Spell Function GetEquippedSpell(int aiSource) native
Event OnObjectEquipped(Form akBaseObject, ObjectReference akReference)
akReference = PlayerRef
if akBaseObject as Spell
if PlayerRef.GetEquippedSpell(0) == akBaseObject as Spell
SpellRefLeft=akBaseObject as Spell
elseif PlayerRef.GetEquippedSpell(1) == akBaseObject as Spell
SpellRefRight=akBaseObject as Spell
endif
endif
if PlayerRef.GetEquippedSpell(0)==SpellRefLeft
MagickaCostLeft=SpellRefLeft.GetMagickaCost()
CastTimeLeft=SpellRefLeft.GetCastTime()
endif
if PlayerRef.GetEquippedSpell(1)==SpellRefRight
MagickaCostRight=SpellRefRight.GetMagickaCost()
CastTimeRight=SpellRefRight.GetCastTime()
endif
if CastTimeRight>CastTimeLeft
RegisterForUpdate(CastTimeLeft)
else
RegisterForUpdate(CastTimeRight)
endif
endevent
Function InterruptCast() native
Event OnUpdate()
if PlayerRef.HasSpell(Endurance)==1
if PlayerRef.GetEquippedSpell(0)==SpellRefLeft && PlayerRef.GetActorValue("Stamina")<MagickaCostLeft
PlayerRef.InterruptCast()
endif
if PlayerRef.GetEquippedSpell(1)==SpellRefRight && PlayerRef.GetActorValue("Stamina")<MagickaCostRight
PlayerRef.InterruptCast()
endif
else
UnRegisterForUpdate()
endif
if PlayerRef.HasSpell(Blood)==1
if PlayerRef.GetEquippedSpell(0)==SpellRefLeft && PlayerRef.GetActorValue("Health")<MagickaCostLeft
PlayerRef.InterruptCast()
endif
if PlayerRef.GetEquippedSpell(1)==SpellRefRight && PlayerRef.GetActorValue("Health")<MagickaCostRight
PlayerRef.InterruptCast()
endif
else
UnRegisterForUpdate()
endif
endevent

Tweaked the Script a bit for efficiency.
Edited by Kerberus14
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...