shinkan's Forum Posts

  • True. Groups and layers do not resets.

  • You can't. Basically if you switch from layout A to layout B then layout A do not exist anymore. Everything on that layout (if not set to global) is destroyed and unloaded from memory.

    "if my player presses the button to go to the main menu and then goes back to the game layout, then the functions are still active"

    hard to tell without looking at your events, but this should not have happened. If you create a bullet (behavior ON by default) on game layout and set its behavior to OFF by some event then when you go to main menu this bullet don't exist anymore (if it's not set to global).

    what you are saying here look like your player is a global object, and if that's true then you will need to manually reset all of his states, behaviors etc.

  • https://software.intel.com/en-us/forums/intel-xdk/topic/593495

    Yeah, The End is Nigh, no more android from C2 etc etc..... some people should learn to read before spreading the panic.

  • Unfortunately that's the way it is. On some mobile it works, on others it works very poorly and on some it does not work at all.

  • Just change the creation from sprite to tilemap tiles

    https://www.scirra.com/tutorials/1123/smarter-procedural-roguelike-dungeon

    i have even post a capx in the comments for this tutorial which uses a tilemap instead of sprites.

  • What exactly you are looking for? all of this tutorials explains all about procedural generation.

  • In even 3 where you have System: Set elapsedTime to TimeAwayL.ElapsedTime you need to put a (tag) at the end so it should look like

    System: Set elapsedTime to TimeAwayL.ElapsedTime("t") in your case

  • Hey, sorry man was away all day. Had a brief look at your capx and try this.

    When all enemies are destroyed (all 5 of them) maybe then make a loop to subtract countdown time for all saved enemies in the array. And when that loop is done spawn new wave of enemies. Loop through huge array will take some time, but if nothing currently will happen on the screen it should be fine.

    As of the subtracting TimeAway from countdowns. You don't need to check them all the time in game. There is no need for that. What you want to do is a quick check only at the Start of layout.

    In short something like that.

    +On start of layout

    ++For Each value > 0 - > set value to value - time away.

    This works as a "game initialization" you only need to run in once, when player starts the game.

  • Ok, got it. From what I see I think you should approach this from other side.

    Don't add enemies to the Array when they are spawned, but rather add them when they are destroyed. In short it means that you don't need to count down for 100 spawned enemies but for 100 killed enemies. If enemy is still alive we don't really need any values in the array for it.

    It's just part of the code and I can't see rest of it, but also You don't need countdown global variable here, just type in values (30,60,90...) right to the array.

    also to make it easier for you, so you don't need to make events for every LevelXP to set array. if you take that each next level is always 30 more than previous one you could do just one event to control all enemies LevelXP

    for example

    enemies: On destroyed - > Array: Set value at (enemies.loopindex, 6 ) to enemies.LevelXP*30 - or any other math expression to describe your leveling system.

    Tell me what is happening on the screen in the game. Are there only a few enemies that you kills and then they are recycled, or enemies spawn every X second, so you can end up with for example 100 of them on the screen at once?

    EDIT: Ok it's not nice to edit the post while someone is writing a replay let me reread what you have edited to see if what I wrote still make sense.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It would be easier for you to use just one array to keep all player scores at same time, update it and sort whenever a player get some points. Then at the end of the game you already have first 3 places.

    If two or more player tie you need to make 2 checks

    player 1 = player 2 - tie, do something

    else

    player 2 = player 3 - tie, do something else

  • +1 as well, I lost so much time by deleting and adding all kinds of effects just to test how they look altogether

  • I don't want to sound like a dick but I'm not entirely sure you know what you are doing.

    I'm trying to understand everything you wrote and show in images and honestly I think you trying to overcomplicate this by a lot.

    Do you really need to countdown hundreds of objects?? What is the purpose in that? I'm just trying to understand your logic so I can help you better.

  • To count down values in array every 1 second you simply do

    +Every 1 second

    +Array: For each X element

    +Array: Value at (Array.CurX, Y) > 0 -> Array: Set value at (Array.CurX, Y)-1

  • You can't manually clear image memory. C2 uses only what it needs for specific layout. When new layout is loaded then all not needed objects are released from the memory and new objects for next layouts are loaded.

    Image memory in the debugger will only show if you use WebGL

  • You can change local variable, but they work in specific scope of events and when that scope ends local variable is automatically reset.

    Read here to get more info about local variables https://www.scirra.com/manual/83/variables