Results 1 to 6 of 6

Thread: Enter/leave scripting zone events break when stated object changes inside the zone

  1. #1

    Enter/leave scripting zone events break when stated object changes inside the zone

    The onObjectEnterScriptingZone and onObjectLeaveScriptingZone events break (don't fire at all) if the object inside the scripting zone is a stated object and the state is changed while inside the zone.

    The current chain of events is this:
    1. Stated object is outside scripting zone
    2. Object enters scripting zone -> "enter" event fires
    3. Object's state is changed inside scripting zone -> "enter" event fires (because object was technically respawned)
    4. Object exits scripting zone -> no "exit" event fires
    5. Object enters scripting zone again -> no "enter" event fires


    Some extra info:
    • Returning the object to the state it was in when it first entered the scripting zone does not fix this
    • Changing the object's state inside the scripting zone always causes the "enter" event to fire
    • Changing the object's state outside the scripting zone seems to reset the problem


    This needs a fix immediately.
    Last edited by chizdippler; 05-29-2017 at 07:33 PM.

  2. #2
    Join Date
    May 2016
    Posts
    1,072
    Worth a mention that they also break when you load a table fresh and an object is already inside the zone.

    It does NOT occur if you load the table, put an object into a zone, save it and load. You have to come in from the main menu then load for the bug to present, then the api triggers will ignore whatever object/s were in a zone at the start.

  3. #3
    Thread moved to Scripting Bug Reports

  4. #4
    I have now realized that this is the same problem as in this thread, though it's still worth mentioning the problem affects stated objects in particular.

    The ultimate problem seems to be that anything originating inside a scripting zone will not trigger the enter and exit events. This is why, after the object's state is changed inside the zone, the events don't fire.

  5. #5
    Ideally it should fire after the onLoad() function fires, then the object is guaranteed to have loaded.

  6. #6
    I posted an example for it in this thread:
    http://www.berserk-games.com/forums/...r-Leave-events

    It would be nice if this could finally get fixed. You can work around this bug when you spawn objects from script but it also occurs when objects are dropped / taken from a bag in a scripting zone or when the rewind button is pressed.

Similar Threads

  1. Replies: 13
    Last Post: 08-26-2018, 05:37 PM
  2. Replies: 1
    Last Post: 12-03-2016, 09:42 PM
  3. Replies: 1
    Last Post: 11-16-2016, 03:01 PM
  4. Replies: 0
    Last Post: 08-08-2016, 05:49 PM
  5. Scripting: onObjectMovedInZone(zone, object)
    By Arcuate in forum Scripting
    Replies: 0
    Last Post: 03-02-2016, 03:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •