Not signed in (Sign In)

Vanilla 1.1.9 is a product of Lussumo. More Information: Documentation, Community Support.

    •  
      CommentAuthorMathdude314 (Advanced Member)
    • CommentTimeOct 21st 2014 edited
     
    http://www.phyard.com/design/Mathdud...
    I'm trying to make it so if any object is restitution 0.2, it sets it to 0 at runtime. The event handler is on the right in scene 3, the "template" scene. It's On Entity Created with an Any assigner attached.

    What's wrong? I know floating-point numbers produce strange results (0.1 + 0.2 != 0.3 anyone?) but this is direct comparison, not addition.-----------------
    If less people are active, that will only make for even less activity. Start making those designs!
    Currently working on a one-round no-elimination quick RP game...
    •  
      CommentAuthorTapir
    • CommentTimeOct 26th 2014 edited
     
    The reason is the scene is merged in an OnBeforeLevelInitilzing event handler of the base scene.
    Yes, the OnBeforeLevelInitilzing event handlers of a merged scene will not run, just to avoid loop scene merging.
    (the merged scene may merge another scene, and the other scene will merge a new scene, ...)

    Following is the execution order of event handlers at the game init phase:
    1. OnEntityCreated for all entities
    2. OnBeforeLevelInitilzing
    3. OnEntiyInitialized for all entities
    4. OnBeforeLevelInitilzing

    So you can merge a scene in OnEntityCreated event handler to make the OnBeforeLevelInitilzing event handlers of a merged scene run.-----------------
    My games: Tapir Games
    My phyards: Tapir@phyard
    •  
      CommentAuthorMathdude314 (Advanced Member)
    • CommentTimeOct 26th 2014
     
    Ok, I actually read your other comment. I made it an on timer interval 3.-----------------
    If less people are active, that will only make for even less activity. Start making those designs!
    Currently working on a one-round no-elimination quick RP game...