How do I translate function

0 favourites
  • 2 posts
From the Asset Store
Implement multi-language translation inside your game effortlessly with the language.translate plugin!
  • this is a math problem more less..

    now i have a boat - it has 6 weapon levels.

    level 1 - shoot forward

    level 2 - shoot forward and left at the same time

    level 3 - shoot forward left and right at the same time

    level 4 - shoot forward different bullets

    level 5 - shoot forward and left different bullets

    level 6 - forward left and right different bullets.

    now i'm tryin' to optimize this code as much as i can and i've already reduced code from 6 subevents to 3,

    but i can't figure how to translate weapon level (1,2,3,4,5,6) to number of bullets (1,2,3,1,2,3). any ideas?

    also how would i use the 1,2,3,1,2,3 for shooting in angles (1 - forward, 2 - forward and left, 3 - forward left and right)?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • variable: numberofbullets = 1;2;3;1;2;3

    set currentnumberofbullets to: int(tokenat(numberofbullets, weaponlevel-1, ";"))

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)