Bug : particule overspawn [SOLVED]

0 favourites
From the Asset Store
Match same tiles with each other as fast as you can and earn more score during a limited time!
  • In my game, when the player fall out the layout, he created a death particule and explode (destroy). After 1 sec he come back to the spawn

    Player is outside layout -> call "death"
    On fonction "death" ->
    set local key "deaths" to int(WebStorage.LocalValue("deaths"))+1
    Player spawn particule_Death
    Player destroy
    Wait 1 sec
    object_Spawn spawn Player
    Everything works perfectly but when the player walk on spike :
    Player on collision with Spike -> Call "death"[/code:3b0esa3f]
    That create a bug : 
    1rst time particule spawn one time
    2nd time 4 particules spawn on death
    3rt time 8
    4rt time 32
    That very anoying cause it make the game lag and not so beautiful
    I DO NOT understand why   with the outside layout it's working perfectly but with spike particules invade my screen
    Thank for reading me
  • When you look in the debugger, how many players are in the game after the 4th respawn ?

    It shows you the amount of instances.

  • ...16

    There it is

    but how it is possible i just destroy it and respawn it one time

    In fact when i say

    object_Spawn spawn playe[/code:35dakajj]r i use a second fonction which :
    [code:35dakajj]destroy player (again)
    system create player at object_spawn.X , object_spawn.Y
    apply skin etc...[/code:35dakajj]
  • Use the "Trigger Once While True " function. You can find it under the systems plugin.

  • To know that, i have to read your capx.

    But if i might make a wild guess. There is a player in the layout. You did not destroy it in a 'on start of layout'.

    And you spawn a new player on some place during run time. So actualy, there are two players in the game.

    Assuming there is only 1 player in the game, your code does not pick a certain player. So all actions adress both players. If you move the player, both get moved. So you dont actual see that there are two players.

  • #99Instances2Go : no there only one player in the game at the start i delete the first at the start of the layout

    #MPPlabtIfficial : i use "trigger once while true" and that don't fix the bug. By "Trigger Once While True" you mean the condition which became "Trigger Once" when create or i'm using the wrong condition

  • As 99Instances2Go has already said, and is always recommended, uploading your .capx is the quickest and most effective way to get the help you need.

    Otherwise the users who generally help can only use guesswork.

  • Where did you put trigger once while true? It needs to go as a sub event under Player on collision with spike.

  • wrong topic, sorry

  • mega. nz/#!mEljADiY!dczm9gBSqRzefjChVPCJGlwrtWakJ4lGo36Dq4P3vT

    my capx (delete space)

    Special gameplay : a plateform-type game

    But every try three random color being "transparent" (no more solid)

    Colors change every respawn

    I'm french so i hope you will understand my events . Some usefull translations : mort = death

    all my principals event are in event sheet named (Event du jeu)

    fonction "mort" : group Perso -> group Perso mort

    fonction "reboot" : Group Random color

    Debbug command :

    in the level choose layout , press = to unlock new level

    in any level , press ^ to open soft debug HUD

    when soft debug HUD open :

    1 - See transparente plateform

    2 - Plateform behavor

    3 - 8direction behavor

    4 - Add point (useless)

    5 - Stop chrono (useless)

    6 - Being immune to deaths (outside layout and spike)

  • Okay i fix it by creating a event that always count the number of player and destroy them if they are more than 1 but it's not very "clean" cause i need to trigger it every tick. I'm searching a "softer" way to do that.

    P.S. I've put trigger once EVERYWHERE but doesn't work

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Mega is asking for a key.

  • Mega is asking for a key.

    Unfortunately, one of the many sites I won't visit because of ads and having to wait.

    OP - please try to use a site that is more friendly to those trying to help.

  • Would really like to scan his capx, its intriguing.

  • dropbox.com /s/qp8swuvk8ielzln/Randomizor%202.capx?dl=0

    (delete space) and say "no thank" if DropBox want you to sign up

    I never had probleme with mega, i use it everyday and i never see pub or wait.

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