the Sim Settlements forums!

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Scripting question about certain Events [Answered]

cbrgamer2

Well-Known Member
Messages
480
I noticed in my decompiled code of ResourceManager.pex, it has the OnWorkshopObjectDestroyed(ObjectReference akSenderRef, ObjectReference akDestroyedRef) event. On the creation kit reference, and in the ObjectReference script, only (ObjectReference akReference) is passed. The same is the case in WorkshopScript.

Is KingGath using a different version of the event that I don't know about? Or is there a problem with the decompiled script? Even in Workshop Framework the event only seems to have the single ObjectReference passed.
 
Last edited:

cbrgamer2

Well-Known Member
Messages
480
It was examples like the one on the OnActivate event page that have confused me on this :
1624709204186.png
It only has one parameter passed in that example and does not have the ObjectReference. at the start.
The example on the page you sent me to is much clearer and matches what that page has said :
1624709237863.png
Thanks for helping me understand this better.

EDIT : I think I understand the first example now. That is how you would do it if your script was extending the ObjectReference script itself.
 
Last edited:

msalaba

Well-Known Member
Staff member
Community Rockstar
HQ Support
Messages
4,068
That is how you would do it if your script was extending the ObjectReference script itself.
Or a script that extends ObjectReference. Or a script that extends a script that extends ObjectReference... etc.
 
Top