When an Areatrigger that is created by an extension script uses OnEnterMethod or OnLeaveMethod, it will search the method from the map script instead of the script file.
Map and Script examples.
Dear forum users! In compliance with the new European GDPR regulations, we'd just like to inform you that if you have an account, your email address is stored in our database. We do not share your information with third parties, and your email address and password are encrypted for security reasons.
New to the forum? Say hello in this topic! Also make sure to read the rules.
New to the forum? Say hello in this topic! Also make sure to read the rules.
AreaTriggers created from extension scripts cannot call functions from extension scripts
Forum rules
By using the forum you agree to the following rules. For this forum you also need to follow these additional rules.
By using the forum you agree to the following rules. For this forum you also need to follow these additional rules.
- JakSparro98
- Superfighter
- Posts: 530
- Joined: Fri Jul 15, 2016 7:56 pm
- Started SFD: PreAlpha 1.0.5
- Location: Rome, Italy
- Gender:
- Age: 25
- Gurt
- Lead Programmer
- Posts: 1884
- Joined: Sun Feb 28, 2016 3:22 pm
- Title: Lead programmer
- Started SFD: Made it!
- Location: Sweden
- Gender:
- Age: 34
Fixed after Beta 1.0.2c
Turns out that this works already for the generic IObjectTrigger.SetScriptMethod, which all triggers call when something happens. Turns out that the AreaTrigger's SetOnEnterMethod / SetOnLeaveMethod called the wrong internal function to make the magic work.
ScriptAPI: Fixed following to work with extension script functions:
IObjectElevatorAttachmentJoint.SetOnDestinationReachedMethod
IObjectElevatorPathJoint.SetOnElevatorReachedMethod
IObjectRailAttachmentJoint.SetOnDestinationReachedMethod
IObjectAreaTrigger.SetOnEnterMethod
IObjectAreaTrigger.SetOnLeaveMethod
Also fixed a bug where IObjectTrigger.SetScriptMethod didn't always trigger functions in extension scripts if the script was deactivated and then re-activated.
Turns out that this works already for the generic IObjectTrigger.SetScriptMethod, which all triggers call when something happens. Turns out that the AreaTrigger's SetOnEnterMethod / SetOnLeaveMethod called the wrong internal function to make the magic work.
ScriptAPI: Fixed following to work with extension script functions:
IObjectElevatorAttachmentJoint.SetOnDestinationReachedMethod
IObjectElevatorPathJoint.SetOnElevatorReachedMethod
IObjectRailAttachmentJoint.SetOnDestinationReachedMethod
IObjectAreaTrigger.SetOnEnterMethod
IObjectAreaTrigger.SetOnLeaveMethod
Also fixed a bug where IObjectTrigger.SetScriptMethod didn't always trigger functions in extension scripts if the script was deactivated and then re-activated.
2 x
Gurt