Jump to content

[WIKI REQUEST] More script examples


CampanaAliquanta

Recommended Posts

For instance, like this one here:

 

This should work:

Scriptname AddThunderPerk extends ObjectReference

Perk property ThunderPerk auto 

Event OnRead()
   if Game.GetPlayer().HasPerk(ThunderPerk) == false
       Game.GetPlayer().AddPerk(ThunderPerk)
       Debug.Trace("Heart of Thunder added")
   endif
EndEvent

 

More examples like these would be enormously helpful, because it gives people new to Papyrus (or to scripting in general) a good idea of how their script structure should work.

 

Would anyone else find this useful?

Link to comment
Share on other sites

I've been working on revamping the current page we have for examples, so that it better fits with the standards I've defined here. I'd be interested to here if anyone has any particular requests, and especially interested if anyone has any comments or criticisms on the standards I've outlined.

 

It can be very hard sometimes for me to see through the eyes of a beginner, and I definitely want to know if you think my ideas will make it harder for you to learn.

 

Cipscis

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...