dop2000's Forum Posts

  • Probably not a bug.. I think what happens is the first "Is overlapping" condition picks instances of Team1 object. So the remaining System conditions in this event are comparing X for picked instances only. If "Is overlapping" picked 0 instances, then the rest of OR block has nothing to compare.

    If you change the event like this, it works:

    That being said, there are problems with OR-blocks in C2.

    See this comment from Ashley:

  • I didn't know how you wanted to arrange your soldiers.

    If you want a grid with 10 soldiers in each row, you can do this:

    variable posX

    variable posY

    System For Each Soldier (order by Soldier.attackDamage) descending

    ....Set posX to (loopindex%10)*70

    ....Set posY to int(loopindex/10)*70

    ....Soldier set position to (X= 50+posX, Y=50 +posY)

    Or you can put invisible "placeholder" sprites to where you want to place your soldiers. And then set position to (X=placeholderSprite(loopindex).x, Y=placeholderSprite(loopindex).y)

  • When you are comparing the angle of EnemyMovement, you are doing it for just one instance of this sprite, not for each instance "linked" to the Enemy. That's why all enemies are set to the same animation.

    You need to add Enemy and EnemyMovement objects to the same container, and remove "Spawn EnemyMovement" action.

    Also, you can pin them together, instead of setting position on every tick.

  • "System" object.

    In the event sheet click "Add event" -> click System -> select For each (ordered)

  • Create a parent event "Platform is on the floor" and move events 5-8 to it as sub-events.

  • No problem!

    Where did you see that I changed the default animation to dash? I didn't.

  • Try Bullet behavior + Sine behavior (with vertical movement)

  • You are simulating controls only when the speed is <200

    Change your events like this:

  • There is nothing wrong with the code.

    Could you share your capx?

  • Make sure that all frames in the running/dashing animations are the same size and the Origin image point is in the same position in all frames.

    There is a common trick that helps to avoid issues like that:

    Create an invisible rectangular sprite with Platform behavior. This will be your main "character" sprite, controlled by the player.

    Remove Platform behavior from your sonic sprite and pin it to the invisible character sprite, like a "skin".

    This way animations on the sonic sprite will not interfere with platform movements.

  • Baddies|On detroyed
       System|Compare two values (random(100)<30)     ->    Baddies|Spawn Goodies [/code:l8xdlyad]
  • When you create a family instance, a random family member (random sprite) will be created. So yes, to make custom particles, you can add all those arms and legs to a family, add Bullet and Fade behavior. When an enemy is killed, create a bunch of family instances, set random angles and speed etc.

    Though it may be easier to have all these body parts in one sprite as different frames. Then when you create a new sprite instance, simply set animation frame to floor(random(Sprite.animationFrameCount))

  • You can try something like this:

    Sprite1 overlapping Soldier
         System->Pick All Soldier
         Sprite2 overlapping Soldier
             System->Pick All Soldier
             Sprite3 overlapping Soldier
                  System->Pick All Soldier
                  Sprite4 overlapping Soldier
                       System->Pick All Soldier
                       Sprite5 overlapping Soldier   -> (Destroy all sprites)
    [/code:3t7plozd]
    
    But it's easier to add Sprites 1-5 to a family and do this:
    [code:3t7plozd]
    SpriteFamily overlapping Soldier
         System Compare two values: SpriteFamily.pickedCount=SpriteFamily.count  -> SpriteFamily destroy
    [/code:3t7plozd]
  • You need to use System For Each (ordered) event.

    For example:

    System For Each Soldier (order by Soldier.attackDamage) descending -> Soldier set position to (X=50+loopindex*100, Y=500)

    This will arrange Soldiers on the screen by their attack damage, strongest first.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Add all enemies to a family. Add all objects you want to be spawned to another family.

    For example if you want to give your enemies 30% chance to drop some object when they die:

    EnemyFamily -> On destroyed

    random(100)<30 -> EnemyFamily: spawn ObjectFamily