Bugfix : script sans mouvement

This commit is contained in:
Philippe Roy 2022-10-09 20:26:45 +02:00
parent 3510919241
commit 2398377909
5 changed files with 7 additions and 47 deletions

Binary file not shown.

3
rp.py
View File

@ -237,9 +237,10 @@ def terrain_run ():
# Démarrage de la map
if scene.objects['Terrain']['thread_cmd']==False:
time.sleep(0.125)
scene.objects['Terrain']['thread_cmd']=True
rp_map.map_reset()
time.sleep(0.25)
time.sleep(0.125)
# Nombre de ligne du script Python
# print (os.getcwd())

View File

@ -22,58 +22,15 @@ from rp_lib import * # Bibliothèque Ropy
# Fonctions
###############################################################################
def mrp_marquer_couleur():
global j
rp_marquer()
time.sleep(1)
rp_couleur("Balise "+str(j), (j/100, j/100, 1, 1)) # Balise
j+=1
def mrp_avancer():
if rp_detect()==False:
rp_avancer()
rp_marquer()
# mrp_marquer_couleur()
def mrp_avancer_nbpas(pas):
for i in range (pas):
mrp_avancer()
def mrp_avancer_mur():
while rp_detect()==False:
mrp_avancer()
def mrp_avancer_mur_sb(): # sb = sans balise
while rp_detect()==False:
rp_avancer()
###############################################################################
# Commandes
###############################################################################
def commandes():
# Mission 6
rp_gauche()
mrp_avancer_mur_sb()
rp_droite()
mrp_avancer_mur_sb()
rp_gauche()
mrp_avancer_mur_sb()
rp_gauche()
for i in range (5):
mrp_avancer_nbpas(9)
rp_gauche()
mrp_avancer()
rp_gauche()
mrp_avancer_nbpas(9)
rp_droite()
mrp_avancer()
rp_droite()
# Ecrire votre code ici ...
rp_fin()
rp_fin() # A garder
###############################################################################
# En: Externals calls << DONT CHANGE THIS SECTION >>

View File

@ -1,6 +1,6 @@
<data>
<config>
<speed>4.0</speed>
<speed>1.0</speed>
<sound>False</sound>
<cam>
<worldPosition.x>0.0057830810546875</worldPosition.x>

View File

@ -133,7 +133,9 @@ def thread_gostore_stop():
def rp_end():
if (debug_thread):
print ("Thread commands is arrived.")
time.sleep(0.125)
scene.objects['Terrain']['thread_cmd']=False
time.sleep(0.125)
def rp_fin():
rp_end()