Menu

Show posts

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 Menu

Messages - Mikey

#1
just write into the story that the main character has a nervous twitch that randomly happens.
#2
Quote 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

yeah i replied to both those posts saying yes i already have changed them to the correct script like i already changed the x and y around and what about the door not equaling 1? the variable default is set to 0 at start and is supposed to be changed when clicked interact on the door and changed back to 0 when i click elsewhere.

The problem is i want the character to be able to select interact with the door without the eblock causing the mouse to disappear and the character not to be able to cancel the interact with door action while walking towards it. Now the character just walks towards it stands on the coordinates and doesn't do anything.
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.

Hi
That would be almost as lame as the mouse disappearing with the eblock. Thanks anyway though. I think i am going to just make my game normally with the eblock and hopefully someone makes a module for the verbcoin gui later on *cough* khris ;)
But yeah don't worry about it because it looks like as thingymebob said it would be crazy as the code would get really big and messy.Thanks anyway people.
#3
lol only just realised there was a page 2. ye i defined it as int door in the global variales but that still didn't affect it. COME ON GUYS PUT YOUR HEADS TOGETHER  :P

what is happening so far is the character walks to the door and just stands on the set coordinates and doesn't open it. I would upload a rar of it if you guys are up for messin' around to see what is wrong.
#4
ok so i put int door = 0; at the top of the global script instead of the room script and it comes up with error undefined token door. i checked the spelling :P don't really know why it is displaying the error.
#5
if i did that it would set the door to 1 and then if i clicked somewhere else it would stay at 1. i defined door at the top of the room script.
#6
what do you mean? is there a walkable area under where the coordinates say? yes there is
#7
yeah i noticed that aswell, that didn't affect anything however.
#8
haha yeah my script would be huge, i'm just going to do the game normally for now (with eblock) and change things when i figure out how.I don't know a hell of alot of script but things like this kind of annoy me for some reason.Thanks anyways.
#9
Code: ags

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;}
}

ok so i entered this and when i click interact with door my character just walks towards it and then stops at the coordinates but the door does not open or any of the other things like restorewalkablearea and region enabled.

Can you see if i have missed anything?

Could it be because i am using a verbcoin template and therefor isn't a click but a release of somekind? thanks for your help so far hudders.
#10
yeah i tried the exact same thing yesterday with those problems.
#11
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;
}


erm ye it works with an eblock but what i said was i don't want him to just go straight there without having a choice of clicking away from it if the player changes his mind as he is walking.
#12
thanks for that but i am using the verbcoin template so importing that module stops my verbcoin from appearing. Thanks anyway. do you know if there is a way i can still do it by doing something like asking if my character has reached the coordinates before performing the action somehow, like i tried in my first post.
#13
I am using the verbcoin template.
i have made a door with the following script which works fine with an eblock put in but what i want is for when i click interact with door, i do not want the player to not be able to move until it gets to the door and opens/closes it. i thought about having the game check to see if the character is on the coordinates it was asked to go to before performing the change but i do not know how to get the players coordinates.

function closeddoor_Interact()
{
cEgo.Walk(70, 230);
if  (int cEgo.y = 70 && int cEgo.x = 230)= true;

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
this line i know is wrong but can someone please tell me what i should put instead, it really is just a random guess i tried but hopefully you can see what i am trying to do.

closeddoor.Visible = false;
opendoor.Visible = true;

else do nothing bla bla bla
}
#14
i have tried that before but as i said it stops the player from walking around. I think it is because the template for the verbcoin uses an inventory that stops all movement when entered and has visible set to false at start. i have tried changing these but they don't seem to work.
#15
http://www.turboupload.com/fqkf4qp0nmpq/gui.rar.html

Hi!
I started using the verbcoin template the other day and have done a load/save screen and menu and some other things but the problem i am having is changing the templates inventory screen to one that is always visible at the bottom of the screen.

It is supposed to look similar to the one in broken sword, except it will be at the end of the screen not the top. Can someone please take a look at the .rar and tell me where i should start. i have tried changing it to be always visible but this causes the cursor to stop letting the character walk around.Thanks in advance to anyone that can be bothered to help me out.
#16
That cave looks sick. Really nice art style. Good luck with it. :)
#17
i am using the verbcoin gui in which you right click to have the inventory appear in the center of the screen. the problem is when the inventory appears and i move my mouse over it the inventory closes because it goes over a character in the background. Does anyone know what i should put in the script to stop this from happening?
#18
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&sectionid=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


Thanks alot.
#19
Sorry if i have missed it but i have searched the forums and cannot find a GUI similar to the original monkey island with the pick up, push, pull etc commands in the 3 by 3 grid at the bottom of the screen.

I would be really grateful if someone could link me to it for the latest version of AGS.

Also is there a thread for recent AGS GUIs for version 3 anywhere? i have found some sites but they are really out of date.

Thanks.
#20
ah i see thanks alot
SMF spam blocked by CleanTalk