Jump to content

Photo

Game.GetPlayer().AddSpell(DiseaseAtaxia) not working

script papyrus disease

  • Please log in to reply
4 replies to this topic

#1
worph

worph

    Regular

  • Members
  • PipPip
  • 85 posts

Script has compiled well.

Property SPELL DiseaseAtaxia Auto added of course.

In game message "Ataxia added" pop-up, 

but no active effects occured.

How to add properly disease spell into script?

 

Thanks in advance for help!



#2
Plastrader

Plastrader

    Enthusiast

  • Account closed
  • PipPip
  • 134 posts

This is weird, because:

pPlayerRef.addSpell(pDiseaseAtaxia)

works

but(as you say)

Game.GetPlayer().addSpell(pDiseaseAtaxia)
doesn't

 

So until someone can explain why they differ, use "Actor Property pPlayerRef  Auto"

Filled with:

cell:(any)
Reference: PlayerRef('Player')



#3
worph

worph

    Regular

  • Members
  • PipPip
  • 85 posts

I`m sorry It`s not working for me as well.



#4
Plastrader

Plastrader

    Enthusiast

  • Account closed
  • PipPip
  • 134 posts

Ok, I'm at a loss here...

It doesn't work for me NOW either!

><

 

[10/18/2014 - 12:50:45AM] [Actor < (00000014)>]>[SPELL < (000B8782)>]

[10/18/2014 - 12:50:45AM] [Actor < (00000014)>]>[SPELL < (000B877C)>]

---

I'll have to get back to you on this matter, I'm the one who should say sorry...

 

[edit]

Ok, now both methods(game.getplayer() & playerRef) works, lets see if it works for you too

Change the disease property to the "TrapDiseaseAtaxia"


Edited by Plastrader, 17 October 2014 - 11:20 PM.


#5
jonharwood

jonharwood

    Journeyman

  • Members
  • Pip
  • 23 posts

Did anybody ever figure this out. I'm having the same issue. Script shown below:

 

Scriptname OMBEncumberanceExtraEffectTrigger extends Actor  
 
SPELL PROPERTY pOMBEncumbrance AUTO
ACTOR PROPERTY pPlayerRef  AUTO
 
Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer)
  if Game.GetPlayer().GetActorValue("InventoryWeight") > Game.GetPlayer().GetActorValue("CarryWeight")
 
pPlayerRef.AddSpell(pOMBEncumbrance)
       Debug.MessageBox("Yup To Much ")
 
  endIf
 
endEvent
 
Event OnItemRemoved(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akDestContainer)
  if Game.GetPlayer().GetActorValue("InventoryWeight") <= Game.GetPlayer().GetActorValue("CarryWeight")
 
pPlayerRef.removeSpell(pOMBEncumbrance)
 
  endIf
 
endEvent






Also tagged with one or more of these keywords: script, papyrus, disease

IPB skins by Skinbox
Page loaded in: 1.126 seconds