Text display issue


#1

Hi Guys,

I want to display a text for ‘x’ seconds and then move to next scene.
How should I do it?? I tried using timedelta() function but did not got any success. so please help.


#2

Just use a timer.
http://wiki.compilgames.net/doku.php/gdevelop5/all-features/timers


#3

Sorry guys I think that’s easy but still not able to rectify the problem.
Please let me know what’s wrong in my code.


#4

You test the timer only when the player is in collision with the enemy, but you delete the player before the timer could reach 2 seconds.

If you want to delete the player then go to a new scene after X seconds, use a scene variable to trigger a scene timer.

The event look something like this:

If player is in collision with enemy and player is on floor: Delete player and DO= 1 to scene variable changeScene
If scene variable changeScene = 1
—If Timer “GameOver” is greater than 2 seconds : Change to scene “Maps”


#5

hi, sorry again but its still not working after the changes


#6

your change action with the timer is a subaction of player collision, i think it should be st the same level


#7

Check the value of the variable at the same level as xisco mentioned and check the value of the timer in a subevent as I showed. --If timer… meant to be a subevent in my reply…


#8

Thnx a lot guys its working now:+1: