johnnyxp64's Forum Posts

  • after lots of tries and playing with events around to understand how they will behave,

    the best solution i have so far is:

    the 1st spawned unit enemies ignore my moved Walls

    the 2nd and later all the rest work fine, an all Test attemps (1st f5 or any other, when i press stop or start button it will always give the same result)

    if i can understand why the 1st units are ignoring me that would be great.... it seems that because those sprites exist in the layout are behaving a bit differently from the ones "spawned" later on

    here are some screenshots an all my events that matter. :)

    imgur.com/a/WXSeZt2

  • thanks mate. even thought i am clearly doing something wrong....somewhere with the "Regenerate obstacle map" i didnt get where should i use that, and then the rest, i have achieved pretty much the result i wanted. is just that is not instant,i mean some units that where already moving or some that they have been spawn pass through the solid objects and take a while for the next to "see them" and properly work.

    also because that idea fills a bit not good for my game, i want to simplify things

    and make the solid objects drag and drop Only before you "start the timer" and then do the spawn and since it will not be dragable i dont have to worry about the issues we talked before.

    enable and disable drag and drop is easy.

    but to my suprize this consept works the 1st time i run the layout

    and never again on the other attempts

    to stop the layout and reset it i use a button that does the following:

    imgur.com/a/iWxj5Oq

    but the solid objects now in a new location when the timer starts again is not reading new paths!?

    why? the path reading takes place after the unite is created, so it should do it like it did in the 1st times.

    very weird. i am must be missing something, that i need to "reset" to make the button actually tell the entire layout to behave that this is like i press f5 for the 1st time.

  • hi,

    imagine a game close to tower defense. but without towers :P

    i have 1 spawn location 1 target location and some solid object in the layout.

    there is a timer that lets say every 5 seconds spawns an enemy unit the uni tries to find a path to the target and then it "moves along path" to that target avoiding the solid objects.

    so far so good.

    the problem is that i made my solid objects to be drag and dropable. so that i can move them around on runtime of the game. But when i move them the enemies keep using the original path they have found and ignore the solid new location, going throw them or just ignore them.

    why? how do i prevent that?

    regards

  • side question thought, hehehee how do you make the text in the buttons aligned center and not always on top?

  • Nothing wrong with doing it that way - if it works, it works! :-)

    hehe thanks mate. as programmer i want to be sure that i am doing it "right" cause i worry if i cause some other unknown behavior in the background or find this in the future in-front of me as a problem.

    but yeah wth... this is my 1st game... i am not trying to become Blizzard in the 00's

    thanks again for the other way you proposed!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • i hate when i post something because i cant find a solution for hours and after i make the post i find something that seems to work :P lol

    i created this Boolean on the button and then i found you can add another condition to events not just one,

    but i would like your opinion if this is the "proper" way to do it?

    https://imgur.com/a/V9DgYli

  • hi guys, newbie here...

    so i have a timer that spawns enemies every 2 seconds.

    but that triggers the moment the game/layout starts.

    i would like to make a button, (added)

    and make that timer/Event to start when i click the button.

    i cant find anything in a Button/Events to do that :(

    should be super simple, right?