What are the steps to ObjRegisterForEvents?
I want to check if the player has recon a stargate in order for the gate to change from an unknown to a known gate.
This entail the recon event triggering to fire a script that changes a local system variable (sysSetData "Gate1" "known")
So how do I get the <OnObjReconned> to fire?
EDIT-
Answer- "Try a something simple."
Code: Select all
<OnCreate>
(block (eventSet)
(objRegisterForEvents gSource gSource)
(staSetFireReconEvent gSource)
)
</OnCreate>
<OnObjReconned>
(block Nil
(objSendMessage gPlayerShip Nil "Fired Recon Event!")
)
</OnObjReconned>
</Events>
Now how can I get <OnAttackedByPlayer> work? It doesn't seem to do anything with a stargate.. is it due to being immutable or is it the <event>?