Behavior Action that modifies SOL

0 favourites
  • 3 posts
From the Asset Store
11 loops of RPG, chiptune/8-bit music. Suitable for any pixel art game.
  • Hi all,

    I'm developing a Behavior that has an Action which will narrow down the selected instances (of the object with that behavior) by comparing some parameters and properties. The problem I have is that the SOL does not reset to select_all after an Event block.

    e.g.

    -> Every Tick

    --> [Action] Sprite | Pick instances where Property value is "Parameter value" #Selects 1 sprite.

    -> Every Tick

    --> [Action] Sprite | Set X to Sprite.X + 50 * dt

    Expected result:

    • All sprite objects to move.

    Actual result:

    • Only the selected sprite object moves. (It stays that way until another condition picks all of the object type)

    However, it works as intended if I simply add an object parameter to the action (even without modifying the runtime code to use the object type).

    Any ideas? (Is it actually OK to change the SOL of an object type through an action?)

    Thanks!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • In the Construct 2 engine, you are not allowed to modify the SOL of any object types other than the self type unless the type you want to modify is given in an object parameter, so this is by design. If arbitrary modifications were allowed, we would have to turn off a very important optimisation that prevents a slowdown proportional to the number of objects in the project.

  • Okay I'll forget about the idea then.

    Thanks for clarifying! :)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)