Keketin's Forum Posts

  • I have a variable that is storing the distance between player and enemy and use it to set a wait x seconds before appearing.

    And it worked okay in my project for a while, but I'm looking to upgrade it,

    because the problem with this is that since I used pixels between the enemy and the player to calculate latency, and the enemy is a global object, this calculation will get messed up the longer the chase is and the more player changes through multiple layouts.. It's difficult to explain like this, I'll try recording a video to demonstrate asap.

  • I have a global enemy that is set to chase the player upon being activated.

    I am struggling with adding some sort of latency to the enemy's re-appearance when player runs through multiple layouts.

    How should I efficiently go about this to make it seem like you are slowly losing the enemy behind? Make the AI smarter as to say.

    The player is able to use teleportation points in the layouts to teleport to somewhere even further, they could even run in "circles" so bumping into the enemy again at a realistic position/layout should be possible. like so;

    Map A > Map B > Map C > Back to Map A

    Due to the teleportation, the player doesn't always necessarily appear at the far ends of the layouts either.

    Could anyone share some examples that could possibly work with this idea of mine?

  • dop2000

    Thanks! It works perfect and I learnt new expressions :>

  • I have an enemy in my game that spawns randomly and upon spawning, it will chase the player for a random amount of time across multiple layouts before it disappears. Now what I want to do is that every time the player moves to another layout it will subtract from the said on-going timer a random amount, as to speed up the timer.

    I know the expression I can use is -random(a,b)

    But there's only start/Stop/pause/Resume options for the timer behaviour so I don't know where to put this expression...

    How should I go about this now? Thanks in advance!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Here is the working example for anyone else that's struggling,

    I tested it and it works smooth like butter.

    The solution was so simple smh

  • I tried many similar things to what you described but wasn't able to make it work as the last line of dialogue just appears whenever trigger was pressed, overriding anything before it.

    However,

    I found my mistake was in the way I tried executing those instance variable triggered events as sub-events for literally the same key press event.

    The way it should work is to make an entirely different block of key press event.

    Conclusion: I have not gotten used to the way construct handles events yet.

    Thank you for repping!

  • I am a total newbie with construct and

    I'm trying to create a game where the player

    mostly just walks around collecting things,

    talking to NPCs and doing puzzles with key items.

    They should also be able to select and choose items to buy/equip/use.

    Now before anyone points me to existing tutorials,

    I already raided the entire forum and tutorials section,

    even youtube over the entire weekend,

    but I have not found a working solution for me yet

    and it's getting really frustrating.

    Either things are too basic to work for my game

    or too advanced for me to understand.

    I have ever only had experience with RPGMakerMV

    and I know next to nothing about programming languages

    so I want to ask for a visual scripting solution.

    Or something that involves as little coding as possible.

    So I want my player to be able to press a button, say spacebar,

    when they talk to an NPC to advance in the next part of the dialogue

    and also be able to use spacebar as a confirm button for menu selections etc,

    whenever they are not engaged in a conversation with an NPC.

    EXAMPLE:

    Player overlaps NPC > Spacebar > show text for dialogue1, line 1

    "Welcome to the shop!"

    Spacebar again > show text for dialogue1, line 2

    "What can I get you?"

    Spacebar again > show text for line 3, so on soforth

    Spacebar again > closes dialogue and reset this chain of actions so that next time the player overlaps this NPC and presses space bar again, this chain of actions can be re-initiated again.

    How can I event a keyboard key to trigger different actions ONE AFTER ANOTHER?

    I mean so that you press the trigger once, action 1 happens,

    and ONLY AFTER action 1 has happened and you press the trigger AGAIN would action 2 happen.