randomly's Forum Posts

  • At the point where you want to spawn the three bullets, add this:

    Repeat 3 times [condition]
           -> Create object "fireball" [action]
           -> "fireball": set angle to: -20+loopindex*10[/code:20jmc0tt]
    
    This will spawn three fireballs, one at the angle -10, one at 0 and one at 10.
    
    If you want something different, just replace the second action with this formula:
    [code:20jmc0tt]"fireball": set angle to: ([highest angle you want] minus [angular difference between fireballs]) +loopindex * [angular difference between fireballs][/code:20jmc0tt]
    
    If you need more help, just send me your .capx or post the context of those fireballs, like angles and stuff.
  • Ahh... elasticity to 1 for every object..

    How could I overlook that. Sometimes it's the small things that make a difference.

    (And yeah, I tried to use the Apply impulse action to simulate bouncing off, not for anything silly )

    Thanks for your help.

  • 99Instances2Go

    Nope, not yet. I'll update this thread as soon as my problem is solved.

  • Or if you simply wanna move something to somewhere over time, use lerp.

  • So, I'm still challenging my (non-existant) math skills with a pool game.

    Currently, I'm having issues with bouncing the balls off the pool table edges.

    I'm using the Chipmunk physics plugin by R0J0hound, so you probably have to be quite familiar with that to help me.

    (I tried using bullet behaviour for the balls with "bounce" enabled, doesn't work, since bullets don't bounce off bullets)

    (I tried using the normal physics, that misses features that I need, like kinetic energy on impact)

    (I tried using chipmunk for impact expressions and bullet behaviour for bouncing off, doesn't work since bullets still don't bounce off each other and bullet & chipmunk don't work together anyways)

    So what I need is an action that I can use to bounce a ball off another object manually.

    Currently, I have this

    after a "On post collide" event.

    That setup is probably total bullsh*t, but this is my first time using CM physics and I am in no way appropriately familiar with the plugin to figure the out the correct parameters.

    (Believe me, I spent hours trying out setups and constellations of parameters)

    Any help is appreciated, thank you.

  • 1. "Score" is a global variable.

    You need to define it as explained here: https://www.scirra.com/tutorials/37/beg ... ge-6#h2a22

    2. background.png is in the compressed ZIP that comes with C2.

    Download the package by going to the "About" window in C2 (File -> "About" at bottom) and clicking "Download Media bundle" above your license.

    Download the ZIP and extract it to somewhere easily accessible.

    The "background.png" will be at [ZIP extracted location]\Sprites\Jungle Platformer\Background Image\background.png

  • Well okay then.

    Go with the layer option then.

    Create two layers, one for the top trees, one for the bottom trees.

    Move the top layer to the top in the z-order and the other layer to the bottom.

    Now, each time you create a tree, you can select on which layer it should spawn.

    Choose the appropriate layer and you're done.

  • Um, you are aware that "Forwards/Backwards" moves the object forwards and backwards on its current angle, right?

    When the object is facing down, it moves downwards and upwards, when it's facing to the right, it moves to the right and to the left.

  • Well, you can simply add an action "Move to top" or "Move to bottom".

    If you happen to use layers, order them appropriately.

    You can also create extra layers for trees and order them how you want.

  • Well, your .capx contains one or more plugins.

    Either remove the used plugins and reduce the .capx to what matters to your question or provide links to the plugins used.

  • So, .capx is updated with the added conditions.

    (Left out some information in my last post, sorry for that)

    Now to "tilewidth * 1.5".

    Refer to this very beautiful Paint drawing:

    The condition used in the CAPX checks whether the user clicked any of the tiles 1 to 8 (numbered by you).

    It does this by checking whether the user clicked ANYWHERE around the red tile. Since the red tile's origin (from where calculations start) is in its center, it's half the tile height/tile width away from the tile's edge.

    So to get from red's center to the outer edge of the adjacent tiles, we need to add half of the tile's height/width plus another full tile height/width.

    The condition now checks whether the user clicked anywhere between the outer edges of the 3x3 grid of tiles around the red tile.

    Only when this is the case, a new red sprite is being created.

  • Forgot one thing:

    You should probably add two conditions

    red.X IS NOT between Touch.X-tilewidth/2 and Touch.X+tilewidth/2
    and
    red.Y IS NOT between Touch.Y-tileheight/2 and Touch.Y+tileheight/2[/code:1h587mh5]
    
    (via system condition "is between values" and inverting that by rightclicking and choosing "invert")
    
    This prevents the system to create a new "red" object when the old "red" object is being clicked.
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You do not have permission to view this post

  • https://www.dropbox.com/s/wqerw7nmya038 ... .capx?dl=1

    If you need explaining, just give me a shout.

    (Or if this is not what you need)

  • Maybe I don't understand you correctly, but wouldn't sending animation details to the peers be a even bigger effort?

    Wouldn't you have to send the exact position of the legs every tick?

    Not only that, but that would consume SO MUCH bandwidth..

    Am I understanding correctly what you are aiming for?