winstreak's Recent Forum Activity

  • This video might help you out. Most of the mechanics are the same and you can look at my code on there too.

    youtu.be/UwLf5Im9Au4

  • This will explain what I mean in pictures :)

  • Ohhhh ... So you would still want to find the closest in the same way.

    Then I would build some invisible walls surrounding the border of the screen on a HUD Layer so they do not move when your character does. Create an invisible line stretched from your hero to your object 'treasure'. And where your line intersects with an invisible border is where you create your marker object.

  • Looks like you do not need the For Each - Pick nearest does that for you.

    Sprite is your hero

    sprite2 is your marker

    sprite3 is your object you summon a bunch of

  • That is why I said to pick the nearest 'Object you summoned a bunch of' - as you called it

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • -For Each Object (Select the Object you summoned a bunch of randomly)

    -Pick Nearest (Select the Object you summoned a bunch of randomly)

    Set Indicator position to (Select the Object you summoned a bunch of randomly .X and .Y)

  • Seems like moveto was triggering multiple times on the ground perhaps? My initial code would slowly move the ground even when I set to in combat.

    Reworked my code:

    (Had to clear my saved state)

  • I have 2 objects - A ground and a slime.

    I move the ground with moveto and keep my main character in place to give the idea of movement. I have an Idle enemy slime that is chilling - AKA should move with the ground. I have the Movespeed for both the ground and the slime set to an algorithm which currently is outputting 11.6666666 for both. Checking my Debug Layout Both ground and Slime have that MS - yet the Ground moves about 5% faster.

    Extra things that may matter:

    • Both are 0 Accel and 0 Decel
    • The ground is much larger - Shouldn't matter but who knows
  • What dop said -

    This will make it so when you increase the size of them, they grow up and left instead of in all directions

  • I haven't used it before so I'm not sure - but have you tried putting both quotes and no quotes around the name?

    Photon.RoomPlayerCount(Name)

    Photon.RoomPlayerCount("Name")

  • I can try to explain it different.

    Create an Object Sprite - Goomba

    Give Goomba the Behavior Platform

    Uncheck 'Default Controls' this will remove your ability to control them with the keyboard arrows

    Now you need Code to Simulate Move Right if they are not mirrored and Move left if they are Mirrored

    Easy route to make them turn is to have 2 object s - one called 'forceMirror' another called 'forceNoMirror'. Set these both as invisible and place a 'forceMirror' on all right edges of platforms and the 'forceNoMirror' on all left edges. Now put a check for each Goomba, if overlapping 'forceMirror' Set Goomba Mirror True and another for each Goomba if overlapping 'forceNoMirror' set Goomba Mirror False.

  • I made a tutorial a while back on Platform enemies walking back and forth without falling off edges. Maybe this will help you out!

    youtube.com/watch

winstreak's avatar

winstreak

Member since 4 Dec, 2019

Twitter
winstreak has 11 followers

Connect with winstreak