Changing languages?

3absh3absh Member Posts: 601

I have an Attribute called ArabicLang
When On The game is in Arabic, when it is off the game is in English
Choosing the language is in the splash screen
I'm trying to make this actor change its self image when pressed so that when the game's language is in Arabic word "English" is displayed and when touched and the game becomes English the Arabic word "عربي" is displayed which simply means "Arabic".
This is my code but it didn't work




Last two images don't show because the text is white

Comments

  • ka822ka822 Member, PRO Posts: 40

    It did not work probably because the touch is always in a released state.
    Try this below:

    1. Add a Self. Sequence attribute to the actor.

    2. Add rule:
      When self.Sequence is 0 and When Touch is pressed:
      Change Self.Sequence to1

    3. Add another rule:

    When Self.sequence is 1, and touch is released:
    If game arabic is false:
    Change game.arabic to true and change Self.Sequence to 0
    If game arabic is true:
    Change game.arabic to false and change Self.Sequence to 0

  • IceboxIcebox Member Posts: 1,485

    Here is another method if you want.

    if touch is pressed

    change attribute Arabic to not(Arabic)

    then create a rule
    if Arabic is true
    self.image to english
    otherwise
    self.image to Arabic

Sign In or Register to comment.