Math for what level is this - HELP!

Ok, so this time the problem is that I want an attribute: game.current level to be in the format of for example: 103 (World 1, Level 3). There are 20 levels per world. So I though the easiest way would be to use the attributes I already have running: game.current world and game.current scene. So is there some way I could use some clever math to have the layout I want please? Any help would be much appreciated.

Cheers

P.S. I really would like it in this format as I have already put in A LOT of rules in a separate actor that refer to the current scene in this way!

Best Answer

  • ShmirlyWhirlShmirlyWhirl Posts: 189
    Accepted Answer
    Assuming game.current scene has the level, and you are trying to get it in to the 103 format:
    (game.currentworld * 100) + (game.current scene)

    Or are you trying to convert from that number to a World 1, Level 3 format?

Answers

  • JagonAppsJagonApps Member Posts: 241
    Ahh great thanks, and I'm not 100% sure, but I think I can just put each attribute in the box and I think it pops out the same, but a useful little equation for the future! Knew it couldn't be too tricky
Sign In or Register to comment.