Bonjour à tous, voilà un script pour utiliser l'ascenseur.
Je remercie Sphinx qui avait publié un script pour les choix multiples et que je n'ai fait que reprendre et adapter au pack PSP DS.
En espérant que celui-ci vous sera utile.
Alors pour l'utiliser, prenez le script qui suit et placer dans Interpreter, à la suite de Draw_choise vers les lignes 800. Ensuite créez la variable 516 (d'après ce script, vous pouvez la modifier, cf. game variable dans le script) que vous nommerez ascenseur. #----------------------------------------------------------------------------
# Ascenseur
#Crédit : Sphinx.
#-----------------------------------------------------------------------------
def ascenseur(arg1 = "1er étage", arg2 = "2ème étage", arg3 = "3ème étage", arg4 = "4ème étage", arg5 = "Retour")
window = Window_Command.new(1, [arg1, arg2, arg3, arg4, arg5], $fontsizebig)
width = [window.contents.text_size(arg1).width, window.contents.text_size(arg2).width, window.contents.text_size(arg3).width, window.contents.text_size(arg4).width, window.contents.text_size(arg5).width].max + 16
window.dispose
@command = Window_Command.new(width + 32, [arg1, arg2, arg3, arg4, arg5], $fontsizebig)
@command.x = 78 - width
@command.y = 2
loop do
Graphics.update
Input.update
@command.update
if Input.trigger?(Input::C) and @command.index == 0
$game_variables[516] = 1
@command.dispose
@command = nil
#Input.update
@wait_count = 2
return true
end
if Input.trigger?(Input::C) and @command.index == 1
$game_variables[516] = 2
@command.dispose
@command = nil
#Input.update
@wait_count = 2
return true
end
if Input.trigger?(Input::C) and @command.index == 2
$game_variables[516] = 3
@command.dispose
@command = nil
#Input.update
@wait_count = 2
return true
end
if Input.trigger?(Input::C) and @command.index == 3
$game_variables[516] = 4
@command.dispose
@command = nil
#Input.update
@wait_count = 2
return true
end
if Input.trigger?(Input::C) and @command.index == 4
@command.dispose
@command = nil
#Input.update
@wait_count = 2
return false
end
end
end
Voilà à quoi ça ressemble plus précisément :
Enfin voilà, en espérant que cela vous sera utile et encore merci à Sphinx, sans qui ce script n'aurait pu être réalisé.