cancel
Showing results for 
Search instead for 
Did you mean: 

Sublevel name?

KevinJardine
Member

I hope that this is an easy question.

I want to get the name of the current sublevel.

When I run this.world.name.get() in a sublevel script, I just get the name of the parent world.  So how do I get the sublevel name? I need this for scoring in my game.

My world allows multiple sublevels to be loaded. So I'm not sure that a global broadcast or variable would work. I basically need to find out what sublevel a script is running in.

1 ACCEPTED SOLUTION

Accepted Solutions

KevinJardine
Member

I think I may have figured out a hack. The scripts are all attached to triggers and since the sublevels all have fixed positions, I can use the trigger positions to determine what sublevel they are running in. Works for me, but something like this.sublevel.name.get() would be easier.

View solution in original post

1 REPLY 1

KevinJardine
Member

I think I may have figured out a hack. The scripts are all attached to triggers and since the sublevels all have fixed positions, I can use the trigger positions to determine what sublevel they are running in. Works for me, but something like this.sublevel.name.get() would be easier.