Newbie Doubt

Post » Wed Mar 18, 2015 7:50 am

Hi, community!

So, I was just reading papyrus introduction page at creation kit wiki and, at that same page, they show this script sample:

Scriptname MyTriggerBoxScript extends ObjectReference


Quest Property MyQuest Auto
Int Property StageToSet Auto

Event OnTriggerEnter(ObjectReference akActionRef)
If akActionRef == Game.GetPlayer()
MyQuest.SetStage(StageToSet)
EndIf

EndEvent

So, I have two Doubts:

1) How can he compare "Object reference" to "game.getplayer()" ? I mean.. When comparing things I expect them to be similiar, like variable == variable or Variable == number.

Are they similar in some way that I am not percieving?

2) Why did he wrote "game.getplayer()" instead of just "getplayer()"

Hope a nice soul can cast some light in these subjects :D

Srry for the bad english btw, Brazilian here

User avatar
Leticia Hernandez
 
Posts: 3426
Joined: Tue Oct 23, 2007 9:46 am

Return to V - Skyrim