AllanR's Forum Posts

  • I played around with a few ideas I had...

    I made a tilemap that is 200 x 200 and put 5 random water tiles on it.

    the search starts in the middle and spirals outward, stopping as soon as it finds water.

    I wasn't sure what you were looking for in CheckAllWater2, so my function just assumes it passes the test and that we found water if it is a WaterTileFresh tile.

    as the search progresses, the searched tiles are turned yellow so you can see what is going on. when it finds water, it turns that tile pink.

    it finds water almost instantly on my computer. on my iPad it takes about 20 seconds just to load the project in preview mode from C2, but once it actually starts it takes less than a second to initialize the array, tilemap and then find water. I tried a variety of ways to test why it was so slow on my iPad. Eventually I loaded the capx into C3, exported, and loaded it from the web - then it only took 4 or 5 seconds to load, then found water in the typical half second...

    https://www.rieperts.com/games/forum/FindWater.capx

  • that's awesome! congrats on 5 million downloads!

    very impressive.

  • you want the set angle set to Yes, for the enemies coming from the right side, you need to use the action "Set Flipped". This needs to be set where the enemies are created - there is probably an action the sets the Bullet angle of motion towards the player.

    (so if the enemy X is greater than the player X, then Set Flipped.)

  • the wait doesn't slow down the execution of the eventsheet - it only defers the actions after the wait until the desired time. So, the while statement is still running 60 times a second...

    instead of a while, I would probably use a global variable as a countdown - and every tick subtract dt from it, and update the progress as that goes down.

  • you have to make sure the Level name is spelled exactly as it is in the Layout in the editor.

    if nothing is happening, then it probably can't find a layout called "level 1"

  • I decided to give this a try, and it was a lot harder than I expected...

    particularly because I figured it should work with multiple lines, and with multi-touch.

    (even if you only have one line, you have to make sure additional touches don't break the action)

    you can have as many nodes making up a line as you want. all the nodes that are part of a line need the same Group name (and the Control sprite that slides along the line needs the same Group name). The nodes are connected in order of their instance number.

    I gave the nodes DragAndDrop behavior so you can change the line for testing purposes.

    if the line bends too much, the Control can get stuck (if you change the direction of the touch just before the Control gets to its target node). I added a bit of an error factor in there which helped a lot. It generally seems to work better with touch than it does with the mouse - it is easier to follow the line with your finger on it, than trace it with a mouse...

    with enough nodes, you could make some nice curves. it you don't want to change the lines at runtime then make the nodes invisible.

    https://www.rieperts.com/games/forum/DragAlongLine.capx

  • the layout L_Sprites does not have an eventsheet assigned to it. When I told it to use the E_Manager eventsheet it worked fine for me. (you set the eventsheet under the Layout Properties on the left)

    You also need an instance of the UNDO sprite on any layout that you want to be able to use Undo on...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think you can find Worker mode in the Project properties, under Advanced...

  • on my PC in Chrome, it gives the following warning: (in developer tools)

    The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. goo.gl/7K7WLu

    so that could be releated... also maybe try other versions of C3 if possible, it could be a C3 bug or C3 work-around issue with Safari that is having trouble.

  • I tried it on my iphone and ipad and it looks like it never finishes loading... so maybe there is a problem with one of the assets. any sounds in the project? icon issue? probably is something simple...

  • in the Project Properties you can specify what is the first layout.

    then in the eventsheet for that layout you need a System action that says "Goto Layout by name"

  • you can make a second family for the purposes of comparing... put all the same sprites in both families.

    then in your function pick the first UID as Box

    the second as Box2

    then you can test if Box is overlapping Box2

  • performance wise I don't think it will make a difference either way - you have to decide which way is better for you to manage. if you do keep them as separate sprites, then put them in a family because you don't want to have to issue 100 tweens! your code should be no longer than Kyatric's.

  • nice ROJOhound! I like the way you did the rotate, and duplicate. I got around the UID issue by not actually deleting the objects - just moving them off-screen. Eventually at save time they would be destroyed and the undo stack purged.

  • here is a start on the Undo/redo...

    at the moment it can only undo the Create actions and the Drag/Drop actions. the undo list is not limited at this point, so you could do (and undo) thousands of actions.

    if you do a bunch of actions, then undo half of them, then start doing new actions, the redo list is truncated at that point since any potential redo's don't make sense anymore...

    any other types of actions you want to be able to undo will each require their own section in the log action function and the undo/redo events...

    for the rotate action, you just want to log the start and end angle, not every 0.35 degree change - it would take forever to undo!

    and the Z-order change will have to get the object back into the original place - I have to think a bit about that one, and I am out of time today...

    https://www.rieperts.com/games/forum/FamilyUndo.c3p