Legend of Grimrock

Legend of Grimrock

Créez et téléchargez de nouveaux donjons, objets, monstres et environnements.
Utilisez l'éditeur de donjon pour construire des aventures et des challenges entièrement nouveaux à compléter pour les autres joueurs. Remplissez vos donjons avec des puzzles, des pièges, ou bien avec des objets, des monstres et des environnements totalement nouveaux avec des graphismes et un audio personnalisés ! Cliquez ici pour en savoir plus.
Grimrock editor: How do I make a combination of three levers which open a door?
I can make one lever open/activate a door. But I don't know how to make a combination of pulling three levers open a door. How?
< >
Affichage des commentaires 1 à 6 sur 6
-- combination lock puzzle2
function pullLever()
if mylever:getLeverState() == "activated" and
lever2:getLeverState() == "activated" and
lever3:getLeverState() == "activated" then
log_door1:open()
else
log_door1:close()
end
end
Hi.. Thanks for answering. I've read about scipting in other forums. But I have to admit, that I don't understand how this scripting works. Where to I write in fx that scripting you've just given me? Can you explain it in more detail and in steps. Like fx first you place the levers, then you.... like that.. And what do I connect the "script_entity" to? The door, lever1 or what? If there are more doors in the room, how do I make it activate the right door?

Confused :)
Dernière modification de Bidanka; 26 févr. 2013 à 2h48
Ok first place the levers
2. Rename the levers (above mine are call mylever, lever2 and lever3)
3.Place the door and rename it (mine is log_door1)
4. place a script entity for the logic section copy and paste my script if you like, into this
5. go to the levers and add connector to the script entity

And that should about do it, hope it helps
oh and of course you can change the combination by changing the leverState part of the script to deactivated if you want it so a combination of on and off levers is required to open the door
If you find scripting daunting, you could also do it using counters, its not as clean and is a bit more time consuming but for those who just cant handle scripts, it will work.

That being said, you'll be able to do a lot more in terms of interesting puzzles if you do learn to script or at least, edit simple scripts that others have uploaded.
< >
Affichage des commentaires 1 à 6 sur 6
Par page : 1530 50