mekonbekon's Forum Posts

  • galtay

    Yeah it's a bit of a fudge, which as you point out will only work with roundish objects. If you need a solution that works with irregular shaped objects you may have better luck using Johncw87 's jcw_trace raycast plugin - it should give you an exact position:

  • Hi galtay, do you mean something like this?:

    https://www.dropbox.com/s/gabg6r1yp5jgw ... .capx?dl=0

  • If you have multiple objects for each level and want to choose a random object from that level selection, then I would have a family per level and use code along the lines of:

    If level = 1 | Spawner spawn family1

    If level = 2 | Spawner spawn family2

    ...etc.

    Spawning from a family automatically chooses a random object.

    If however you want to spawn a specific object, then the family doesn't help you so much and you're better off using:

    If level = 1 | Spawner spawn object1

    If level = 2 | Spawner spawn object2

    In Construct 3 you can spawn objects by name, which allows you to reduce the total number of events but in C2 you have to call object spawns in separate conditions or use a 3rd party plugin.

  • Try...

    Set Text to zeropad(floor(t/3600),2)&":"&zeropad(floor(t/60%60),2)&":"&zeropad(floor(t%60),2)

    ...where t is your total seconds.

  • Hi luck1210

    Sorry for the delay in responding - here's a demo showing three different techniques:

    https://www.dropbox.com/s/sottt7g05enlr ... .capx?dl=0

  • marcoscodas

    Here's a small demo I made a while back for doing this style of adventure game, using AJAX and an array:

    https://www.dropbox.com/s/lajf6pr775paz ... .capx?dl=0

    It includes an image for each question and answer.

    In this version you can click on the alternative response to see what answer text would be for that option - you'd want to disable that in your game.

    Click on the answer text for the next question.

  • You could also add the timer behaviour to the object and then set the timer to regular to repeat the rotate every x seconds.

  • Instead of spawning a beacon object you could add instance variables to the npc: "targetX" "targetY" .

    On mouse click, if there is no NPC in the space set targetX, targetY to mouse.X,mouse.Y. and trigger the pathfinding.

  • Malhog

    As zenox98 said, posting files would be best, but if that isn't an option for you, have you checked that Tile X spacing and Tile Y spacing are set to zero in the tilemap object properties?

  • Are your enemies destroyed in any other event where lives are not <=0 or Type is not <=1? If not then it doesn't matter that the "on destroyed" event isn't nested and the other conditions aren't needed.

    If you have more than one type of enemy, or enemies are also destroyed in other events where their live value is greater than one then I'd use something like this:

    Enemies|On destroyed:

    Lives <=0:

    Type <=1: Do A

    Type =2: Do B

    Lives >0:

    Type <=1: Do C

    Type =2: Do D

    The "On Destroyed" condition would be a top level event. Exactly how you order the rest of the hierarchy is dependent upon the conditions you have set up for destroying the different enemies: you may want to switch it instead to have the Lives conditions nested under the Type conditions.

    What you definitely don't need is the "trigger once" condition with the "On Destroyed" condition, as "On Destroyed" will only trigger once per enemy that is destroyed anyhow.

  • You could put all the code in the included event sheet in a group and then toggle that group from the parent sheet.

  • duke2704

    Swapping Touch.AbsoluteXForID(touchID) and Touch.AbsoluteYForID(touchID) for Touch.X(ID) and Touch.Y(ID) in events 2 & 3 worked for me.

  • You don't need to move those conditions. they should stay where they were before. You only need to move the on destroyed condition and its associated actions to be a main event.

  • Yes, move the Enemies|On destroyed event and its associated actions to be a top-level event rather than a sub-event and you'll be fine.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sure, you'd use two instances of the same sprite rather than one tiled background object showing two copies of the image.