LittleStain's Forum Posts

  • I don't have the time to make your program for you..

    You can get the information which marker you clicked, so all you have to do is compare that to be sure the marker you want to be clicked is clicked.

  • Basically you need to know what you want your enemy to do under what conditions..

    Then all you need to do is write the events and attach the actions..

  • The basic way to do something like this would be to have a global variable, set it on the first layout and check the value of this global variable on start of the second layout..

    If the condition is true create object.. (or if the condition is false destroy object, whichever suits you best..

  • I'm pretty sure I've seen tutorials about this specific subject..

  • For me the most efficient way to prevent physics from slowing down my game has been not to use physics..

  • like I said you shouldn't use the pathfinding for the movement..

    on path found just make the enemy move one spot in the direction of the first node of the pathfinding..

    So every time the enemy has his turn, first use pathfinding to find the path to the player, than use the grid movement to move 1 square..

  • LittleStain - Ok I know you've been hit with this one a lot and I appreciate your time so I'll be quick. How do I make it so the green block can only move once then stop, and then the AI Let's say a purple block takes a turn moving toward the green block position and stop. So the other one cannot move until after the other ones turn. How do I make the AI block do this on it's own?

    Group activate and then deactivate maybe? Is it possible?

    Thanks

    shouldn't be that hard..

    To create the turns you'd need a switching global variable..

    Based on who's turn it is either the player would move or the enemy..

    you could have the enemy find the path to the player using pathfinding (without diagonals) and have it move in the same way as the player..

  • Well yeah, that will not work..

    How to make a request:

    The basic usage of the AJAX object consists of:

    • Use the Request action to load a URL.
    • A moment later after the request completes, On completed triggers.
    • The LastData expression can be used to access the content of the response.

    There's an event "Ajax on completed", which will trigger when the request is completed..

    Before the request is completed, you won't be able to use the ajax.lastdata..

  • LittleStain I tried the ajax option but the problem is that the project snap

    can you check the screenshot to see if I am using the ajax correctly

    "https://drive.google.com/drive/folders/0B1pGW-xaP8VfMXVpRWZPZVo2Y0U"

    If you could give a link that I can open, I could take a look..

    This link can't be opened..

  • replace that condition with the "on timer" condition..

    so remove the condition "time = 2 seconds" add the condition "on timer"

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You could do this easily with the timer behaviour..

    Just create a sprite called "timer", which we'll use for for project-wide timing and give it the timer behaviour..

    on start of layout we'll set the timer for 2 seconds..

    Replace the time = 2 seconds with an on timer event..

    you can restart the timer either in the event itself or in the event that destroys the rock and blockade..

  • I'm not sure if you can directly use the name of the file, but if you can't you can request it with ajax and use ajax.lastdata..

    for more information have a look at the manual for ajax and project-files..

  • Would system every 2 seconds work for this?

  • If I had any idea what you want it would be easier..

    What do you mean when you say:

    "a transition or distortion on the layout or weapon. "

  • Unable to use "On start of layout" as it's triggered by other events.

    Tried the trigger once but still doesn't break out of looP.

    Will try trigger once and sub event now.

    Well... if it is triggered by other events, shouldn't it be a sub-event of that triggered event?

    The loop shouldn't be run every tick, only when certain conditions are met it should run once..

    right now the "trigger once when true" has no further conditions, so it is triggered once per tick