Jump to content

A little help with SetFactionRank ?


Voidshard

Recommended Posts

Hi there,

 

I have a new script for a group of actors I am modding at the moment. Or attempting too, in this case.

 

My script (let's call it myScript) extends Actor, I have created a faction (myFaction for example) and I have added two ranks (0 and 1).

I then attempt to call

 

SetFactionRank( myFaction, 1)

 

The script fails to compile. Irritatingly I can't seem to get Notepad++ to compile papyrus (cmd using the batch compiler doesn't seem to find the file in question either - Probably a path issue but ...meh) so I am left with only the blank "Compile Failed" message to guess what went wrong.

Still by editing / commenting things in an out I believe this line to be the problem.

 

 

Sadly the code doesn't recognise the "this" keyword .. although it shouldn't be required here anyway since the actor in question should be the actor the script is attached to.

 

<><>

 

Scriptname myScript extends Actor

 

auto STATE stay

Event OnActivate(ObjectReference akActionRef)

If akActionRef == Game.GetPlayer()

SetFactionRank(myFaction, 1)

goToSTATE("follow")

endif

EndEvent

endSTATE

 

 

STATE follow

Event OnActivate(ObjectReference akActionRef)

If akActionRef == Game.GetPlayer()

; stuff

goToSTATE("stay")

endif

EndEvent

endSTATE

 

<>

 

 

Naturally my question is, I must be missing something (probably something obvious knowing me) but what is it?

 

 

*Edit* Sorry the code looks awful. It is nicely formatted when I go to post it ..

Edited by Voidshard
Link to comment
Share on other sites

  • Recently Browsing   0 members

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