tristanojbacon's Forum Posts

  • I need to pick the nearest instance of the same object for a targeting system (in this case, enemy ships), but can't wrap my head around it.

    I found this old thread with a solution, but the capx and screenshots are gone.

    Any ideas?

    Tagged:

  • Thanks for the code! Would you mind breaking it down a bit more, so I know the best way to set those initial variables.

    Specifically, scrollx (should I create a new global variable, or somehow overwrite the system variable?), msyspeed, dt and tStartx.

    Also, where should I place the second code? Is that one event, or multiple?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • (Bumping)

  • You have no speed element as I can tell.

    Yes, because I don't know how/where to add a speed element, or what a speed element should look like...

  • I'm developing a space game, and the user can zoom out to see more of the playing area. I do this by halving the `LayerScale` for each layer each time they press the 'zoom out' key.

    1 is fully zoomed, 0.125 is full zoomed out.

    The Problem: I have a drag-to-scroll function, which works fine on zoom level 1, but when I zoom out, the scrolling/dragging speed is half each time. How do I keep the same scrolling/dragging speed (or do I need to increase it?)

    These are my events:

    I attempted to play with the dragging calculations in lines 11-12 (where the comment is - e.g. doubling different variables at smaller zoom levels), but that didn't work. 11-12 is now unused, so won't impact the overall function.

    Tagged:

  • I'm developing a pirate ship game, and am having trouble with the NPC ship movement and combat.

    I tried using Pathfinding, but I want the NPC ships to turn to the side in order to fire at the player (you know, like a normal sailing ship).

    I originally did (excuse the psuedo code): Pathfinding to player -> stop when distance is <= 300 -> turn until player at 90 deg. angle -> fire

    However, it looks unnatural and I want the NPC to steer naturally and keep moving 'around' the player at a 90 deg angle. If the player then moves, the NPC adjusts, and so on.

    I saw in this thread construct.net/en/forum/construct-2/how-do-i-18/pathfinding-car-behavior-120396 that the poster had a similar issue, however the .capx solution isn't available anymore and no real explanation was given.

    Has anyone else got experience with this?

    Tagged:

  • I'm developing an MMO for mobile, and am looking for an experienced Construct3 developer to support with bug fixes and complicated features.

    Quick summary of the game:

    • Set in early-1700s in a semi-fictional world
    • Fight and trade your way to fame, glory and coin
    • Sail for one of the three colonial powers, or for yourself as a pirate
    • (Imagine a mix of Assassin's Creed Black Flag, Planetside 2 and Runescape)

    (Excuse the graphics, all the assets are placeholders!)

    Progress

    So far I've built approx 60% of the game myself over the past 2 months, including movement, combat, inventory, NPCs, locations, a basic multiplayer and player-data server syncing.

    What I'm looking for

    I need an experienced developer to help me with the next 'obstacles', including effects, a proper multiplayer, better NPC AI, a quest framework, performance optimisations and help ironing out some bugs across the existing features.

    I'd prefer to work with someone on a rev-share basis (and be in it for the long-haul), but I'm happy to receive paid bids as well!

    Any questions, let me know :)

  • Set bullet speed first, then the angle of motion. If speed=0, then setting angle of motion has no effect. Also, try changing "Set angle" in Bullet properties.

    Setting the bullet speed first worked perfectly, thank you!

  • I have a 'fortress' sprite in my game, which should fires cannonballs at the nearest ship.

    I've set the fortress sprite to rotate towards the picked ship (no problems there), but the cannonball's angle isn't being set according to the fortress sprite's rotation.

    The cannonball (black circle) just moves straight along the same angle every time (red arrows).

    And this is the event sheet.

    I've used this exact event layout for the Ship sprites (they have left, right and front cannons), and the bullet angle of motion is fine.

    The one difference is that the Ships have Custom Movement behaviour, so I set the ship's sprite angle to the Custom Movement 'moving angle'.

    However, the Fortress sprite's angle is being set normally on its own (I've checked in Debug).

    I also created a separate "cannon" sprite attached to an image point on the fortress, to see if setting the 'cannon' angle and spawning the proj

    I followed advice I found in the forum about setting the angle for all cannonball instances, but that messes up the cannonball firing for the Ships objects.

    Also, I didn't have to do this for the Ship objects in the first place, so why should I have to do that now?

    Tagged:

  • Does your ship and tilemap have a solid behavior? Are you using an 8 direction movement behavior? Are you manually setting x/y coordinates?

    Both objects have Solid behaviour, and I'm not manually setting X/Y coordinates.

    For movement, I'm actually using the Custom movement behaviour.

    It's a sailing game, so to move the player adjusts the sail up/down and accelerates according to wind speed and max. ship speed. They then move in arcs, rather than up/down/left/right.

    I did add a Custom movement 'Stop' action when the player collides with the tilemap, but if I start moving again, the ship object just carries on through the tilemap.

  • I am trying to implement tilemap collisions.

    When the ship (see screenshot) collides with one of the tiles (in red), it stops. However as soon as I start moving again, it just carries on through the tile and into the nearby ones, even though they each have collisions set.

    The tilemap object has solid behaviour, and all the collision checkboxes are checked for the tilemap and ship object. I've tested all variations, with and without.

    I saw other threads where people recommend invisible sprites for collisions, but the islands in the game are big, and adding lots of invisible sprites would kill performance.

    Any recommendations?

    Tagged:

  • Part of my game involves the player capturing zones. If they stand in a capture point for X seconds (using collisions and a timer), the zone is theirs and it changes colour.

    The simple solution would be to have a big square sprite, but I'd like the boundaries/borders to be more natural/free-flowing.

    Ideally, I'd be to be able to mark out the boundary points in Construct, and when the game loads, the zone is drawn out using those points (see below)

    The red dot circle is the capture point, and the grey dots are the zone boundary points.

    If a player then walks into that zone, a text object will say which team owns it.

    So is there a way to join all of those up, and detect when the player is in that zone?

  • Ok, so I found the Moving Angle and CurrentNode expression for the Pathfinding behaviour, and have changed the sprite to rotate towards the CurrentNode it's walking towards.

    However, I tried to change the animation based on angle, but I don't understand how the angles are decided. Is it relative to the node (with straight forward being 0 degrees), or is there a 'global angle' based on the layout that I can use?

    This is what I have now, and the animations are all over the place during Preview

  • I'm working on a top-down game with moving NPC sprites, and I'd like to use different animations based on their direction of movement. They all have 8-direction behaviour, but the only way I can see to change animations based on direction, is with keyboard input. However, these aren't player characters.

    I've found the "8-Direction -> Is Moving" condition, but no conditions or actions relating to direction of travel.

    I've tried doing it by object angle, but the object doesn't have rotation enabled. I also tried adding an invisible pinned sprite and rotating that, but I still can't find any conditions that would enable rotation based on direction of travel

  • I'm working on an RTS mobile game, similar to classics like Age of Empires, but I'm trying to decide whether I should design it as a Top-Down (like Zelda or Pokemon) or Isometric (Age of Empires, Diablo or Clash of Clans)

    What do you all think? Do you have a preference between the two?

    (From a player point-of-view, not as a developer)

    I'm also torn between artistic styles: realistic (Age of Empires) and 'cartoon' (Clash of Clans).

    These are more open questions than anything - I'm keen to hear what people think, based on their own experiences of playing mobile games!