kill all enemys ?

kill all enemys ?

Postby Oliver_Buo » 07 Aug 2019, 20:51

Hello everybody
Is it possible to set a level where the condition is that all opponents must be eliminated. Then the level ends automatically? is this something? Would be cool. :cool:
User avatar
Oliver_Buo
 
Posts: 286
Joined: 27 Nov 2016, 17:51

Re: kill all enemys ?

Postby Oliver_Buo » 25 Aug 2019, 14:53

or get all coins....

the level is automaticaly finish whne u get all coins ? is that possible to make a such level ? what would be the script for it ??
User avatar
Oliver_Buo
 
Posts: 286
Joined: 27 Nov 2016, 17:51

Re: kill all enemys ?

Postby Tobbi » 25 Aug 2019, 16:46

You'd have to increase a counter on collect of coins, then check if the number of coins collected equals the counter, then call Level_win or whatever the function is. Same for enemies, although that's a kill script you'd have to set.
SuperTux developer.
User avatar
Tobbi
SuperTux Moderator
 
Posts: 353
Joined: 12 Oct 2013, 13:08

Re: kill all enemys ?

Postby Oliver_Buo » 08 Sep 2019, 16:03

aha....can u make a Exampel who the script should looks like. for exampel for a level with 15 coins.
collect all coins = level is finish .....what Script to use for it ? - i have NO idea..... :?

thanks a lot.
User avatar
Oliver_Buo
 
Posts: 286
Joined: 27 Nov 2016, 17:51

Who is online

Users browsing this forum: No registered users and 0 guests

cron