Jump to content

Photo

Scripting help


  • Please log in to reply
24 replies to this topic

#21
OminousVoice

OminousVoice

    Enthusiast

  • Members
  • PipPip
  • 227 posts

I dont think you need to check if the player has the perk, 'caus he wont gain it again anyways.

so 4 lines should do

Scriptname AddThunderPerk extends ObjectReference

Event OnRead()
  game.GetPlayer().AddPerk(ThunderPerk)
endEvent


This is what's bugging me. I tried a near identical script a few days ago (with debug.trace included) and it still wouldn't work.

#22
Jugg3r

Jugg3r

    Newbie

  • Members
  • Pip
  • 16 posts
Hm. You might try to give the perk through other objects first like some stationary with OnActive events. If those wont work either, something is preventing it.

I do have some other problems with removing spells. Although it SHOULD work, the character still has those spells avaliable ...
Perhaps some global scripts we dont know ...

#23
ctzto

ctzto

    Newbie

  • Members
  • Pip
  • 11 posts
Try this... Event OnRead(Actor "actorName"). You might have to add the "actorName" to game.GetPlayer("actorName").

A side note. Do leave the check when you compile the script at least that way you know it works. When you finish the mod just take out the check.

Edited by ctzto, 18 February 2012 - 11:52 AM.


#24
OminousVoice

OminousVoice

    Enthusiast

  • Members
  • PipPip
  • 227 posts
I think the problem is that the OnRead event isn't being called when it should. In fact none of the various events I've tried have been called either. I think the source lies elsewhere, perhaps a global script or something that's stopping events from being called and thus preventing the script from working.

#25
OminousVoice

OminousVoice

    Enthusiast

  • Members
  • PipPip
  • 227 posts
Well, I gave up on the book. The script wasn't being called no matter what event I used. In the end I modified it and attached it to the chest the book was in. Works like a charm now.

In any case, thanks for all the help offered. I appreciate it.

Edited by OminousVoice, 19 February 2012 - 03:36 AM.





Page loaded in: 0.977 seconds