function hHotspot19_UseInv()
{
if (call == 0){
if (player.ActiveInventory == iYkey){
cJason.Walk(420, 333, eBlock, eWalkableAreas);
cJason.LockView(25);
cJason.Animate(0, 2, eOnce);
PlaySound(11);
Display("Unlocked.");
dialog[0].SetOptionState(4, eOptionOffForever);
dialog[7].SetOptionState(4, eOptionOffForever);
SetGlobalInt(min, 0);
}
}
if (call == 1){
if (player.ActiveInventory == iYkey)
{
cJason.Walk(420, 333, eBlock, eWalkableAreas);
cJason.LockView(25);
cJason.Animate(0, 2, eOnce);
PlaySound(11);
Display("Locked.");
cJason.UnlockView();
SetGlobalInt(min, 1);
}}
if (call < 2) {
call += 1;
}
if (call == 2) {
call -= 2;
}
}
function hHotspot19_Interact()
{
if (call == 0){
cJason.Walk(420, 333, eBlock, eWalkableAreas);
cJason.LockView(25);
cJason.Animate(2, 2, eOnce);
PlaySound(1);
Display("It 's locked.");
dialog[0].SetOptionState(4, eOptionOn);
dialog[7].SetOptionState(4, eOptionOn);
cJason.UnlockView();
}
if (call == 1)
{
cJason.Walk(420, 333, eBlock, eWalkableAreas);
cJason.LockView(25);
cJason.Animate(0, 2, eOnce);
player.ChangeRoom(6, 0, 0);
PlaySound(0);
}
}
- It all works, but if I use another inventory item on hotspot 19, the game takes the command changeroom and goes to room 6, if I use a cup, lamp wick or something else(because only key must work on door and not the other inventory items). Can anyone say what this is or what I did wrong.? I made a door you must unlock(you can lock it and unlock it) with inventory(yellow key) and then use the interaction(hand) to open door and go to room 6, but you can use any type of inventory now on hotpsot and you will find yourself in room 6 and that 's not what I want.