Scripts / Kill x enemies and go to a specific level

Author
Message
Enzo1400
6
Years of Service
User Offline
Joined: 26th Jul 2018
Location:
Posted: 27th Oct 2018 04:59
Hello to everybody!

I've tested the smallg's script "kill x of y quest" : https://forum.game-guru.com/thread/207801?page=3#msg2490852 and it works well, but I would like that the "reward" is to jump to a specific level. I've tried with a winzone but it doesn't work.

The script is this:



About you, which is the best way to implement this win condition?

Moreover, I've also tested the script "kill x enemies to open door" : https://forum.game-guru.com/outbound?url=https%3A%2F%2Fforum.game-guru.com%2Fthread%2F207801%3Fpage%3D10%23msg2532248 but it doesn't work properly. After the first kill, the counter not works. Please, can anybody test it?

Please, for me it's important to create a game in which the player kills a specific number of enemies to go to another level (possibly with a written similar to "well done, go to level..." before that), or to kill a number of enemies in order to open a door (that leads to a win zone).

I think that these win conditions are good for many people.

Thank you in advance.
PM
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 1st Nov 2018 00:08
You could use the example I sent you in your other post for destroying an object to get this working. All you need to do is transport the player when the goal is achieved and it will automatically load the next level from the winzone.

You might be able to force it by simply calling

JumpToLevelIfUsed(e)

in the above code and setting your winzone to be as large as the map you have.
SPECS: Ryzen 1700 CPU. Nvidia 970GTX. 16 Gig Memory. Win 10.
Enzo1400
6
Years of Service
User Offline
Joined: 26th Jul 2018
Location:
Posted: 2nd Nov 2018 23:03
Thank you, I will try
PM

Login to post a reply

Server time is: 2024-12-22 20:26:32
Your offset time is: 2024-12-22 20:26:32