Everytick event got delayed by seconds

0 favourites
  • 3 posts
From the Asset Store
Very simple code without excess options (15 events for server and 11 events for client)
  • My game is like a tower control game. The towers will fire continually (except grey/neutral tower). You have to set the angle of your tower (blue tower) to the enemy and destroy their towers. By destroying it, you will spawn your own tower on the destroyed tower place.

    here is my capx

    https://dl.dropboxusercontent.com/u/15249798/Every%20tick%20event%20got%20delayed.capx

    I use the [plugin] Timeline https://www.scirra.com/forum/viewtopic.php?t=64376&start=0

    and the [behavior] Cooldown https://www.scirra.com/forum/viewtopic.php?t=64408&start=0

    plugins

    I am dealing with two major problems which I will describe here.

    Every tower has a max health of it's scale times 10.

    The percentage of the max health from a tower, determines its rate of fire.

    Basicly, when the tower has full health it will fire at full speed. Less health results into a slower firespeed.

    As visual feedback I set the oppacity of the towers depending on their health percentage.

    The health check and the opacity setting are found in the everytick event, however this seems not to work properly.

    It got delayed by seconds.

    I have found that the bullets in game cause this trouble, but I don't know how to fix this.

    The everytick event can be found on the top of the event sheet.

    Another problem is destroying other towers doesn't work properly.

    When the red_tower has zero health. The next collision with a bullet determines which faction the new spawned tower should be.

    red_tower has zero health and it collides with a blue_bullet. red_tower will be destroyed and a blue_tower should be spawned.

    However, sometimes the towers won't be destroyed at all. I couldn't figure out why.

    These events can be found in the collision condition group.

    I am looking forward seeing your suggestions

    ikke2902

  • You're using two plugins there that I don't have - Timeline and Cooldown.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ahh, updated with the link to the plugin pages

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