just write into the story that the main character has a nervous twitch that randomly happens.
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: Trent R on Sat 25/04/2009 03:08:48
Assuming your code is still the same as this post... You have two problems.
1) You're checking the wrong coordinates, Hudders already mentioned this.
2) door variable doesn't equal 1, thezombiecow mentioned this.
So what's the problem?
~Trent
Quote
Hi,
Maybe you could use something like this:
If there's some kind of Player.IsStandingOnHotspot(hotspot_id) then replace the if statement with it. Or you'll have to use "top, left, bottom, right" with room coords to create a hotpsot.
Code:Code: ags function door_interact() { if(Player.x >= left && Player.x <= right && Player.y >= top && player.y <= bottom) { Door1.visible = false; Door2.visible = true; Wait(10); Player.ChangeRoom(7); } else { Player.Walk(X,Y,eNoBlock); //X and Y are room coords inside the hotspot } }
This way the player will start walking to the door and will only open it when he uses interact while standing on the hotspot.The only problem is that you'll have to click one time to get to it and once more to open it. Or just one time if you're already standing there.
int door = 0;
function on_mouse_click(MouseButton MouseLeft){
if (Object.GetAtScreenXY(mouse.x,mouse.y) == closeddoor){
door = 1;
}
else
{
door = 0;
}
}
function closeddoor_Interact(){
cEgo.Walk(70,230);
}
function repeatedly_execute(){
if (cEgo.y == 70 && cEgo.x == 230 && door == 1)
{
RestoreWalkableArea(2);
region[1].Enabled = true;
closeddoor.Visible = false;
opendoor.Visible = true;}
}
Quote from: Hudders on Thu 23/04/2009 09:34:18
Use eBlock to stop the door changing before he gets to the coords:Code: ags function closeddoor_Interact() { cEgo.Walk(70, 230, eBlock); closeddoor.Visible = false; opendoor.Visible = true; }
Quote from: abstauber on Tue 14/04/2009 15:31:06
Hi!
Right now I'm aware of 2 GUIs:
1) Maniac Mansion Mania starterpacks
http://www.maniac-mansion-mania.com/index.php?option=com_contentask=category§ionid=2&id=3&Itemid=76
They come with a functional GUI
2) KhrisMUC's work in progress (which is not an official release)
http://www.adventure-treff.de/forum/viewtopic.php?f=7=13574
I'm using this one, but you should know about scripting to iron out some bugs or to customize it properly
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.028 seconds with 14 queries.