I want to make two sprites to gradually appear after that a group of sprites are destroyed.

0 favourites
From the Asset Store
Footsteps SFX Two contains 450 sounds of steps and jumps on different surfaces.
  • To Tomycase:

    How the horizon laser cannon works:

    The horizontal cannon is moving from right to left and at the extremity of the laser cannon, there is a long vertical laser ray that moves from right to left at the same time that the horizontal cannon are moving. And like the code indicates the vertical laser ray disappears every 4 seconds and reappears every 8 seconds.

  • To Tomycase:

    How the horizon laser cannon works:

    The horizontal cannon is moving from right to left and at the extremity of the laser cannon, there is a long vertical laser ray that moves from right to left at the same time that the horizontal cannon are moving. And like the code indicates the vertical laser ray disappears every 4 seconds and reappears every 8 seconds.

  • To Tomycase:

    How the horizon laser cannon works:

    The horizontal cannon is moving from right to left and at the extremity of the laser cannon, there is a long vertical laser ray that moves from right to left at the same time that the horizontal cannon are moving. And like the code indicates the vertical laser ray disappears every 4 seconds and reappears every 8 seconds.

  • Em, what the message spam is for exactly?

  • Em, what the message spam is for exactly?

    Sometimes the site breaks when you submit a post and you think it hasn't posted it when it has.

  • To plinkie:

    Thank you for explaining what happened to Tomycase.

  • To Tomycase:

    This is not spam, I thought that you did not receive my message.

  • It's not because I didn't answered that I didn't see it, I'm not always available, get my own stuff to do too, anyway;

    I'll be looking at your lazer code today, did you test what I sent yesterday for your turrets?

    (also there is an edit button if you need to add something to your post instead of reposting one)

  • Yes, I test Turrets yesterday and works but I still have the memory problem (the game us slowing down or stops) probably because of the horizontal laser cannon or there is an enemy character that I should remove from the layout to save memory.

  • Did you make sure that the turrets lasers got destroyed at some point? Otherwise it will create more and more objects on your layout, give it the "Destroy outside layout" behavior, or destroy the lazer if not on-screen by events

    My take on your cannons : i.ibb.co/jwdHjbJ/Example3.gif

    The code:

    I used a "On start of Layout" trigger but you can use whatever trigger you want (a function for example) to setup the cannon's laser; I gave a boolean variable to the laser sprite "Active" that I toggle on/off with a function (so it doesn't rely on a loop);

    When "Laser" function triggers, if laser boolean is false, it will turn it true and change its visibility/collision enabled, and the opposite if true on "Laser" trigger; be sure that boolean is true before running the events, otherwise it won't work as intended;

    Edit : I think your slowdown comes from a loop somewhere in your events, I'd need to look at your project capx if only you agree ofc, but that way I can check what is going wrong

  • To Tomycase:

    I am not comfortable to give my .capx file. However, I can send you a picture of all the loop located in my Event sheet and from there, you can tell me what the problem is. Is that ok with you?

  • Sure, if you can locate the problematic event, send me a screenshot and I'll take a look;

    Did you try the cannons method?

  • Yes, I have tried the cannons methods and it works. But the game is slowing down and stops each time that I make a test. These are pictures of the two loops that my Event Sheet contains. I have tried to locate what the problem is with the "Debug Layout" button but I really don't understand how to detect a problem using that option. Here are the pictures of the loops:

  • It probably doesn't come from those loops, there are probably other pieces of code in your game in which an event is positioned wrong and keep creating objects or something like this, check in the debug menu if one of your object instance number increases constantly

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • To Tomycase:

    Ok, I notice that there is a number located next to a sprite named "sprTurretsLaserRay" who is rising to 4, decreasing to 2, rising to 8 and then decreasing back to 2 again. Maybe this is the area where the problem is located. This is a picture of my Debug layout page. Maybe it's going to be helpful.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)