Thnx Worked ^^
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuQuote from: Khris on Wed 08/06/2011 18:38:51Yay ! This was the problem. Thnx, tho I should have noticed it myself, has happened to me before -.-. I often just go straight to script and type the function.
If you look at room 2's events (lightning bolt icon), does it say "room_Load" next to "Enters room before fade-in"?
Quote from: Hernald on Wed 08/06/2011 15:33:00i don't think so. Where can I check that?
Just a thought: There is a system variable on rooms that sets them back to there original state whenever the player returns if it's switched on. The default is off which it correct for what you're doing, you haven't switched it on have you?
Quote from: Hernald on Wed 08/06/2011 15:06:36I don't understand what do I have to right click on?
Yes, that's the globals pane.
If you right click on one of the places you set MySwitch2 it will give you the option to list all the places it is used. You may find that useful in seeing if it is used somewhere other than the places you've mentioned.
function room_Load()
{
if(MySwitch2 == 1)
{
opomm1.Visible = false;
opomm2.Visible = true;
oglass.Visible = true;
oSquare.Visible = true;
}
}
function hHotspot3_UseInv()
{
if (player.ActiveInventory == iDeadcat)
{
player.Walk(207, 135, eBlock);
player.LoseInventory(iDeadcat);
if(MySwitch2 == 0)
MySwitch2 = 1;
}
}
bool isDoorOpen = false;
function cVamp_UseInv()
{
if (player.ActiveInventory == iklaasjaveri) {
cVamp.Say("Thank you for the blood.");
cVamp.Say("How can I repay you?");
player.Say("Let me through the door, maybe?");
cVamp.Say("Ohh, alright. You deserve it.");
oDoorOpen.Visible=true;
oDoorClose.Visible=false;
player.LoseInventory(iklaasjaveri);
isDoorOpen = true;//Set the door to "open".
RestoreWalkableArea(2);
}
}
Quote from: Khris on Wed 06/04/2011 14:38:33I don't know howQuote from: Creator on Wed 06/04/2011 10:42:08
EDIT - Just noticed that cVamp would be in the GlobalScript. This means you would have to make a global boolean in the Global Variables pane in the editor.
function room_Load()
{
RemoveWalkableArea(2);
}
function cVamp_UseInv()
{
if (player.ActiveInventory == iklaasjaveri) {
cVamp.Say("Thank you for the blood.");
cVamp.Say("How can I repay you?");
player.Say("Let me through the door, maybe?");
cVamp.Say("Ohh, alright. You deserve it.");
oDoorOpen.Visible=false;
oDoorClose.Visible=true;
player.LoseInventory(iklaasjaveri);
RestoreWalkableArea(2);
}
}
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.069 seconds with 14 queries.