CookingwithMike's Recent Forum Activity

  • Oi, nubbies!

  • Best of luck! I'll try to remember to check back in.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Setup event:

    >On click/touch

    • • • • >Set SomeTimingVariable to 1

    • • • • >Wait 0.25 seconds (or however long you want the "rapid succession" window to be)

    • • • • >Set SomeTimingVariable to 0

    Base event:

    >On click/touch

    • • • • >If SomeTimingVariable is 0

    • • • • • • • • >[Do whatever initial thing you want to happen]

    • • • • >Else

    • • • • • • • • >Set Ball.Speed to Ball.Speed+100 (or whatever speed amount you'd wish to add)

    Good luck, hope this helps!

  • Another simple way would be

    This makes it work nicely when falling, and still only triggers if the jump is actually pulled off.

  • Oh! In that example I added absolutely every sprite/etc. that will need to be isometric'd into the family IsoObject. So basically a family for almost every object you have other than HUD stuff, menu screens, and so on.

  • Alternately, if you don't want to mess with the font origin point, you can have an event like

    >For each SpriteText >Move SpriteText to (Button.X - SpriteText.CharacterWidth/2) , (Button.Y - SpriteText.CharacterHeight/2)

    assuming that Button's origin point is in the center and the button text is one letter. Add a multiplier for more letters, and an instance variable for multiple buttons.

  • Valhallen's answer really is the best way I can think of to do what you're doing. If you want them to spawn very close to each other, though, with maybe momentary overlap, you could just wait a very short amount of time to enable collisions (have the objects start without it). The downside of this is that they won't collide with anything within that initial short range.

  • Oh snap, I forgot one on the end. Updated.

    Honestly, mine is only the way it is because I try to super-minimize the amount of numbers I'd need to change if I wanted to change the line (in this case, just the 5). Functionally, the only real difference is that yours technically has a range of 20, where mine has a range of 10 (between upper and lower limits). Good work!

  • Here was my little code snippet that made isometric work for me:

    For collisions, I basically made a little invisible point object that pushes the player away within a certain distance. This made it effectively "round" shaped, which was nice for helping push the player around it instead of just stopping movement entirely.

    Inside buildings etc. could be handled with simple location code (>If Player.X within x-x >AND >If Player.Y within y-y >Set ThatOneWall invisible (>Else set ThatOneWall visible)) or with doorway object collisions/etc.

  • Generally, processing code is a relatively light process. You really could just set your dock up with code like

    >If App is Unlocked >Show icon

    >Else >Destroy icon

    (to put it very crudely). There isn't really a need to have it trigger on layout starts and then have to figure out how to re-trigger it later on in the same layout.

  • Oh! The thing I was talking about was for when you're not shooting towards a fixed position. In this case, the easiest way I can see in the actions would be to add an action immediately after that says

    >Rotate clockwise > Degrees: (choose(-1,1)(random(5)))

    which will rotate it one way (positive, clockwise) or the other (negative, counter- or anti-clockwise) 5 degrees.

    The first method I posted involves choosing the angle based on two objects, typically the shooter and the target. x1, y1 is the position of the shooter, and x2, y2 is the position of the target. You can also do it sort of like you did, setting angle towards Target.X, Target.Y.

    Well, have fun!

  • Assuming you set the angle using angle(x1,y1,x2,y2), you could change that to

    >Set angle to angle(x1,y1,x2,y2) + n - random(2n)

    where 2n is the variance you want. For example, if you want a 10 degree variance, that expression there would read

    + 5 - random(10)

    Basically, the plus sets your upper limit, then the minus drops it to somewhere between your upper and lower.

    You could also use

    >Set angle to angle(x1,y1,x2,y2) + (choose(-1,1)(random(n))

    which for some reason pleases me greatly, and means you only have to adjust one number. Again, n would be half of your variance. Mostly I posted the first one first to explain why the thing is happening.

    (To other math nerds, sorry, I notated it that way for text simplicity.)

CookingwithMike's avatar

CookingwithMike

Member since 6 Aug, 2012

None one is following CookingwithMike yet!

Connect with CookingwithMike

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies