CookingwithMike's Forum Posts

  • Another simple way would be

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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.)

  • Well, the reticle being bound to mouse XY is going to keep it locked there; trying to make it move with the player would basically mean trying to move the mouse cursor with the player, which I don't think is possible with a browser-based game system.

    One simple way of pulling it off would be to keep the character centered at all times (scroll to) and make sure that the layout itself is always allowed to scroll (basically, you need to prevent the player from reaching the edge of the layout).

    You end up with this: http://superstickman.com/movingreticle/

  • Yep, ^ that. I love an elegant response.

  • For really raw, from-scratch 8-bit sounds, I use this guy: http://www.superflashbros.net/as3sfxr/

  • Aight, here's something simple that should do it?

    1. Give Enemy3 an instance variable; let's name it "Firing" and make it Boolean (true/false) for simplicity.

    2. In your first event (System > Time = 40 seconds), add the action "Set Enemy3.Firing to True".

    3. In that same event, add the actions "Wait X seconds" (X is however long you want it to last) and then "Set Enemy3.Firing to False".

    4. In your second event, (System > Every tick), change the trigger from "System > Every tick" to "Enemy3.Firing is true".

    This oughta do it. You could also make Firing be True by default and skip step 2, but this allows you to use the enemy in other places without having it explode all over the place.

  • Does Metal Slug count? Because Metal Slug 4evr.

  • "Pick" won't work because that picks existing objects. You might just want to have your trigger event fire and then do something like

    If Parameter=0, spawn ParticleObject0

    If Parameter=1, spawn ParticleObject1

    etc...

    Brute force, but it works, and easy to do since you only have six in the family.