Sharply pushing things away (for Angry Blosics)

I made a modification (read: duplicate) of Max Marin's "radial gravity"[1] behavior, so that instead of gently pulling* things towards the actor, it sharply pulls* things. The "sharp radial gravity" behavior is made for things like explosions.

The sharp behavior works as normal, although sometimes, with negative force values, it seems to be pulling things instead of pushing them!

Any help is greatly appreciated! :)

*: The behaviors will push things away if the "Force" attribute is set to a negative number.
[1]: https://community.stencyl.com/index.php/index.php?topic=61547.msg316777#msg316777
I like making physics puzzle games.
Stay tuned for more Angry Blosics updates!
R.I.P Sploder 2007-2020
Stencyl is the new Sploder.

Luyren

  • *
  • Posts: 2799
If I understood it correctly: don't use negative forces.
My Stencyl resources are available here: https://luyren.itch.io/
Cutscenes, RPG Elements, Particles, Map System and many more.

But I'm using the sharp behavior for explosions. How am I supposed to make it PUSH things, not PULL them?
I like making physics puzzle games.
Stay tuned for more Angry Blosics updates!
R.I.P Sploder 2007-2020
Stencyl is the new Sploder.

Luyren

  • *
  • Posts: 2799
Reverse the operation of your "set X" and "set Y" blocks in the updating event, that should do it.
Also, only use one updating event per behavior, that is my recommendation.
My Stencyl resources are available here: https://luyren.itch.io/
Cutscenes, RPG Elements, Particles, Map System and many more.

I like making physics puzzle games.
Stay tuned for more Angry Blosics updates!
R.I.P Sploder 2007-2020
Stencyl is the new Sploder.

Luyren

  • *
  • Posts: 2799
It seems my description was unclear.
Set X to X-center of actor on region minus X-center of self
Do the equivalent on Y.
My Stencyl resources are available here: https://luyren.itch.io/
Cutscenes, RPG Elements, Particles, Map System and many more.