je veux ! je veux! c'est un bien grand mot, je fait surtout ce que je peut mais comme mon labyrinthe n'est deja pas tres grand (environ circoncis dans un 640x480 a cause de l'habillage graphique) le mode case a case me semble peu ludique alors j'ai prefere lui donner un continu...
il est peut etre temps de te donner le code ...
--------------------------la balle (sprite 5)
property vx, vy
global h, v
on beginsprite me
vx = 0
vy = 0
end
on collider me, dir
if dir = #g then
vx = 0
sprite(5).loch = h + 15
else if dir = #d then
vx = 0
sprite(5).loch = h - 15
end if
if dir = #h then
vy = 0
sprite(5).locv = v + 15
else if dir = #b then
vy = 0
sprite(5).locv = v - 15
end if
if dir = #w then
sound(1).play(member("applause" ))
go to frame 1
end if
end
on exitframe me
if keypressed(123) then
vx = vx - 10
if vx < -20 then
vx = -20
end if
else if keypressed(124) then
vx = vx + 10
if vx > 20 then
vx = 20
end if
end if
if keypressed(126) then
vy = vy - 10
if vy < -20 then
vy = -20
end if
else if keypressed(125) then
vy = vy + 10
if vy > 20 then
vy = 20
end if
end if
end
-------------mur x (associé a tout les murs horizontaux)
global h
on beginsprite me
sprite(me.spritenum).locZ = -100
h = 0
end
on exitframe me
if sprite 5 intersects me.spritenum then
sendsprite(3, #vie)
h = sprite(me.spritenum).loch
if sprite(5).loch < sprite(me.spritenum).loch then
sendsprite(5, #collider, #g)
else if sprite(5).loch > sprite(me.spritenum).loch then
sendsprite(5, #collider, #d)
end if
end if
end
end if
sprite(5).loch = sprite(5).loch + vx
sprite(5).locv = sprite(5).locv + vy
end
- la condition w (win) ce produit quand la boulle est en contact avec le sprite de l'arrivée
- j'ai mis que mur x car mur y est franchement tres identique
- si il manque un end ou un end if a la fin du script de la boulle c'est surement un PB de copier / coller (y 'as pas director sur les postes internet de mon ecole)
- sois indulgent ca fait 2 mois que j'essaye director a un rythme peu intensif (pas assez a mon gout)
NB: si QQ'un connait des bons bouquin pour commencer director ca m'interresse (ceux que j'ai vu a la fnac sont soit trops compliqué (faire un jeu en 3D entierement en lingo) soit vraiment trops simple)