warmon's Forum Posts

  • 12 posts
  • Hi everybody!

    There is a Pairs game where a user have to find similar cards among others. No flipping, just find two of the same cards, and they will disappear. The game finishes as soon as all the cards left.

    All graphics are ready.

    Please PM me if you are interested.

  • Hi!

    I'm working on a game menu where there is a popup sprite + txt + btn.

    Is there any way to group different objects together? Some kind of extended Family maybe? Plugin?

    Now I have to make absolutely same actions for all objects and it's not very convenient as you know.

    I attached an example: https://www.dropbox.com/s/bflfwhx4koc0c0q/popup.c3p?dl=0

  • well, that was an entertaining thread

    AndyRevenko

    Thought I would add another example...

    Like gameglaux said (maybe a little poorly), if you don't want the single tap code to execute, you have to add a delay and wait to see if there is going to be a double-tap. After a short delay, if there has not been a double tap, then you can execute the single tap code. The single tap event will always fire, so you have to come up with a method of waiting. The double tap event does fire if there are two quick taps on the sprite.

    I took up gameglaux's challenge and make a capx where you single tap to destroy a sprite, or double tap to make it flash. It took 4 events (plus two to spawn a new sprite to try again).

    http://www.rieperts.com/games/forum/TapDoubleTap.capx

    Wow, it's the only solution in a whole thread that really works! Thanks a lot for a great example with comments!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You forgot to delete the Physic behavior of the single sprites since the family already has this behavior.

    Oh, man! I didn't forget, I didn't know it matters at all (just started learn Construct a month ago).

    Thanks s lot! Now it works great!

  • Hi gyus!

    I'm working on a physical explosion. It's easy to create while exploding a single object's instances. But as soon as I'm starting to work with a Family of myltiple objects, everything goes in unexpected way.

    I heard working with Families is specific and maybe in my case I have to use UIDs? I have no idea how to implement it, so I'm asking for your help.

    Source file:

    https://www.dropbox.com/s/orugpcqi54yoxbo/Expl_family.c3p?dl=0

  • Check your range.

    Sorry man, a stupid mistake - I considered a circle with 200 px radius the same as a 200 px distance from player. Draw a 400 px circle and your solution worked perfectly!

    You can use distance() to get the boxes in your radius, then pick the nearest one to the ship.

    Wow! So simple! Thanks a lot, sizcoz! I tried smth like this myself but didn't use Pick by comparison condition.

    My final code looks like this (I used your first version as a blueprint):

    gamecorpstudio, thanks a lot for great examples, I will definitely look through them!

  • Rex's RotateTo addon is still incompatible with Physics. You should try using only Physics actions to move Physics objects. For example, for rotation use "Set angular velocity".

    Impulse is a momentary thing, like kicking a ball. You apply it once.

    Force is continuous, like pushing a box. You need to apply it on every tick.

    I didn't use Rex's RotateTo and I was upset I had not found it before. But as it's not compatible with Physics it turns out that everything was not in vain =)

    Thanks for this additional info!

  • Line of sight is for picking instances in front of other objects, and picking instances by means other than the system distance() expression.

    You may need to adjust the Los default settings however.

    I updated my post, please check it once again.

  • Use the Line of Sight behavior

    Player has los to box

    ->box pick closest to ship

    Set LOS to 200 px and excluded Solids from obstacles.

    Smth is wrong with the distance but in general looks like it's working.

  • Guys, I'm newbie and I have a problem that I can not solve yet. Please see attached img to get understand my issue.

    I have a Family of objects - different boxes. I need to find the box nearest to the ship, but I have to take into account only those boxes that are at the fixed distance to the player.

    I can easily find the nearest box without taking into account the distance to the player by Pick nearest to target.X, target.Y. But there is a problem with linking it to the distance to the player.

    Perhaps I need to make an array of boxes that are at the desired distance to the player and then run through this array to compare the distance from each box to the target to find the closest one?

    How to implement this algorithm?

  • Thank you very much for your answer and useful links!

    I had to refuse to use Pathfinder as it is inadequate in the physical world.

    I also refused to use Platform, cos my bot have to physically interact with other objects during the move.

    I realized the movement by increasing the speed of the bot (it just jumps all the time). I have no idea how to use force for movements(as many people advice). Using impulses was not smth I was looking for cos it's too complex to control.

    However, there is a very good plugin for implementing the movement if you can't use custom moves or platform: rexrainbow.github.io/C3RexDoc/plugins.md/site/rex_rotateto/index.html

  • Hi!

    I'm working on a physics based platformer where enemy bot follows player climbing on a solid rock. I'm trying to write some AI to make bot follow a player and avoid obstacles by jumping but it's harder than I though. Is there any examples of using pathfinding methods in a Physics world?

  • 12 posts