how complex do you want "wearing" your gloves (or your "wearing" game element~feature itself) to be?
some options:
1. simply checking if the "item" (the "gloves" Object) is in your inventory:
// I'll have to check exactly how the syntax is, as this is just a guess (too lazy to look it up at the moment, lol)
if (Contains (ScopeInventory, gloves) {
-> // unlock exit
} else {
-> msg ("You need the gloves first")
}
2. a single simple string attribute:
// after getting~finding (taking) the gloves (into your inventory)
player.equipped = gloves
if (player.equipped = gloves) {
-> // unlock exit
} else {
-> msg ("You need the gloves first")
}
3. an equipment system, either simple or complex
viewtopic.php?f=18&t=2901viewtopic.php?f=18&t=2567(Pertex' Combat Library also has an equipment coding too, but it's more specialized for his combat library and it's a bit "code-heavy" to understand, so I'm only mentioning it here, instead of pasting the link for his combat library here)
viewtopic.php?f=18&t=3515viewtopic.php?f=18&t=2557----------------------
Exits:
(all from the wiki's tutorial,
http://quest5.net/wiki/Tutorial )
http://quest5.net/wiki/Creating_a_simple_gamehttp://quest5.net/wiki/Using_lockable_exitshttp://quest5.net/wiki/Using_lockable_exitshttp://quest5.net/wiki/Using_lockable_containers (not dealing with an Exit, but deals with "locking" still, you may want to use this in your game possibly)
from the wiki's "how to" (
http://quest5.net/wiki/How_to ):
http://quest5.net/wiki/Hs-blockingexithttp://quest5.net/wiki/Hs-lockedexitshttp://quest5.net/wiki/Hiddenexit--------------------------
1. "so the player needs a Pickaxe to breake the rock first (opulus)"
use the "Use" feature
for conceptual example:
rock.broken = false
use pickaxe on rock
rock.broken = true
if (rock.broken = true) {
-> // unlock exit
} else if (rock.broken = false) {
-> msg ("You need to break the rock first")
}
2. "what do I have to do if I want the player to use the picaxe more than one time to brake the rock (opulus)?"
for conceptual example:
rock.broken = false
rock.pickaxe_use_count = 0
pickaxe.durability = 3
pickaxe.broken = false
use pickaxe on rock
if (pickaxe.broken = true) {
-> msg ("your pickaxe is broken, you'll have to find another one")
} else if (pickaxe.broken = false) {
-> rock.pickaxe_use_count = rock.pickaxe_use_count + 1
-> pickaxe.durability = pickaxe.durability - 1
}
if (rock.pickaxe_use_count = 3) {
-> rock.broken = true
}
if (rock.broken = true) {
-> // unlock exit
} else if (rock.broken = false) {
-> msg ("You need to break the rock first")
}
if (pickaxe.durability = 0) {
-> pickaxe.broken = true
}
3. "And the third thing is that I want to script something like falling Rocks over the Exit the player comes from when he enters the room. So he cant leave (oculus)."
"OnEnterRoom" Script:
// lock exit
msg ("the boulders fall over the exit behind you, blocking you from using it, at least you got through the exit before getting crushed to death by them... maybe if you could find something to break the boulders, you can get back through the exit again")