I was just wondering if there is any way to lock a room until a certain item or centian items are found please help !!
Thanks Simon
I don't think that you can lock a room but you could check if the player has these items and then enable the hotspot (or whatever you use for changing the room).
It would look like this:
// script for Room: Repeatedly execute
if (player.InventoryQuantity[InventoryItem1Name]==1 && player.InventoryQuantity[InventoryItem2Name]==1 && ...)
{
hDoor.Enabled=true;
}
Or rather, put this script in where you want the room change to be triggered (e.g. "Any click on hotspot", although I wouldn't recommand that ;))
if (GetGlobalInt(1)==1) //your conditions
player.ChangeRoom(2,5,17); //Put the room change here
else
player.Say("I can't go there right now!"); //what you want to happen if the conditions are not met
As easy as pie. Easy pie.
You are right, Akatosh. It's better to use the click feature for hotspots, cause then the door is also clickable, when you haven't the items you need.
hey could you tell me how i use these codes I'm new to this
thanks
They pretty much HAVE told you how & where to use them...
Quote from: Lt. Smash
// script for Room: Repeatedly execute
Quote from: Akatosh
put this script in where you want the room change to be triggered (e.g. "Any click on hotspot"
You need to add a 'Run script' interaction in the Interaction Editor. After that, you can insert the code as Lt. Smash and Akatosh suggest.
Let us know if you have ay specific problems after that.
thanks