Aller au contenu
  • 0

Mini jeu --> Tp random


Question

Posté(e)

Bonjour a tous,

 

je suis actuellement entrain de créer un jeu utilisant au début un tp random. J'aimerais vérifiez avec vous si mon code n'est pas trop "bancale".

set {_random} to a random integer between 1 and 14
                       wait 0.5 tick
                       if {_random} is 1:
                           teleport loop-player to {LG.location.1}
                       if {_random} is 2:
                           teleport loop-player to {LG.location.2}
                       if {_random} is 3:
                           teleport loop-player to {LG.location.3}
                       if {_random} is 4:
                           teleport loop-player to {LG.location.4}
                       if {_random} is 5:
                           teleport loop-player to {LG.location.5}
                       if {_random} is 6:
                           teleport loop-player to {LG.location.6}
                       if {_random} is 7:
                           teleport loop-player to {LG.location.7}
                       if {_random} is 8:
                           teleport loop-player to {LG.location.8}
                       if {_random} is 9:
                           teleport loop-player to {LG.location.9}
                       if {_random} is 10:
                           teleport loop-player to {LG.location.10}
                       if {_random} is 11:
                           teleport loop-player to {LG.location.11}
                       if {_random} is 12:
                           teleport loop-player to {LG.location.12}
                       if {_random} is 13:
                           teleport loop-player to {LG.location.13}
                       if {_random} is 14:
                           teleport loop-player to {LG.location.14}

 

Merci et a bientôt :)

2 réponses à cette question

Messages recommandés

  • 0
Posté(e)

Hmm je suis pas sûr mais tu pourrais remplacer par:

set {_random} to a random integer between 1 and 14
                       wait 0.5 tick
                       teleport loop-player to {LG.location.%{_random%}

  • 0
Posté(e)
Hmm je suis pas sûr mais tu pourrais remplacer par:

set {_random} to a random integer between 1 and 14
                       wait 0.5 tick
                       teleport loop-player to {LG.location.%{_random%}

Merci de me répondre, sa fait plaisir ;)

Pour le code, faut que je le test, je le ferais demain sûrement ^^

×
×
  • Créer...

Information importante

Nous avons placé des cookies sur votre appareil pour aider à améliorer ce site. Vous pouvez choisir d’ajuster vos paramètres de cookie, sinon nous supposerons que vous êtes d’accord pour continuer.