winstreak's Forum Posts

  • I threw this together quickly for you

    I use Globals to track my randoms, each on can be 1-10 (This is done by the Random1through10 Function)

    I set all values to 0 every time I run the function - clearing any old numbers

    Then I call my function 4 times to generate 4 numbers.

    One by one I set my Globals, which means if NoRepeat1 is 0 then I haven't set any and NoRepeat1 is allowed to be any random I roll

    The 2nd time the function runs NoRepeat1 wont equal 0 so it will go to the else NoRepeat2 equal 0. Now I need to verify NoRepeat2 is not the same as NoRepeat1. If it is the same I reset the value to 0 and run the function again. Which will make it to the same block and attempt again. If it's true I move on to NoRepeat3 which then checks the previous 2 in the same fashion. Last I check 4 against the previous 3.

    Obviously this will get gross when trying to do more than 4 numbers but it will work for your case and you dont have to worry about Arrays ;)

  • Looks like the way I did it was with

    Up and Not right and Not Left - travel up

    You can check out this video I build a movement system from scratch

    youtube.com/watch

  • I would Imagine it will take into account your lowest code -

    If rightArrow: Move Right

    If downArrow: Move Down

    If you press both right and down it will see you are pressing right then in the same instance see you are pressing down and override your move to Down.

    You'll need to create a movement state

    If upArrow and rightArrow :

    Else If rightArrow and downArrow:

    (One for each angle then one for each single button direction, this way they don't ever overlap)

  • Happy to help! :)

  • Construct can handle the math for you - If you wanted it to shoot exactly 3 times more than what mine was doing (Which I believe was every 2 seconds) Just add /3.

    As for having a dynamic fire rate (One that can change during the game) give each enemy an instance with a value for the starting fire rate. Then have enemies fire every Enemy.value. You can then change the values based on enemy rarity or damage taken.

    Firing multi bullets instead of create object 'bullet' 1 time you can do it multiple times with a wait 0.01s and you'll get cluster shots.

  • Hey Moebios, I made a video about this a while back. This should help you out with any issues.

    youtu.be/7w87y6j6Dk8

  • You do not have permission to view this post

  • You have to remember that Construct is a Giant loop already.

    Everything is always happening While each condition is true. "While" loops just open the potential to delve deeper into the same event until a condition is met.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • No you don't need it, it is simply a way to find the intersecting point. You can also us math to do it by finding the X distance from you to the edge and comparing it to the X distance from you to the treasure, then taking that % of the Y distance and that'll give you the position.

    This in my opinion is a lot harder to understand/show in a forum.

  • 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

  • -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)