mirror of
https://forge.apps.education.fr/blender-edutech/ropy.git
synced 2024-01-27 08:23:20 +01:00
Bugfix : script sans mouvement
This commit is contained in:
parent
3510919241
commit
2398377909
BIN
ropy-28.blend
BIN
ropy-28.blend
Binary file not shown.
3
rp.py
3
rp.py
@ -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())
|
||||
|
47
rp_cmd.py
47
rp_cmd.py
@ -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 >>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<data>
|
||||
<config>
|
||||
<speed>4.0</speed>
|
||||
<speed>1.0</speed>
|
||||
<sound>False</sound>
|
||||
<cam>
|
||||
<worldPosition.x>0.0057830810546875</worldPosition.x>
|
||||
|
Loading…
Reference in New Issue
Block a user