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 - aerguin

#1
Oh I did it, it wasn't that hard after all  :)

I created another Property for the Items that only said if that Item could change of possible Interactions during the game. If it did (this property > 0) then this variable points to the location in that global array of Strings that will correspond to this Item. The Property that defined the interactions for this object are copied into this global String and this string is used from now on in the game for this Item, so the the old Property itself is used only as initialization.

Well thanks!
#2
@ buckethead.

All my Items (hotspot, object, everything....) have a String property saying what interactions can be made upon them. For example if there's a key on the table I could only "LookAt" and "PickUp" it, not "Push" or "Open" it. Depending on these values I create a different GUI with the corresponding Interaction choices for the user.

The thing is that for example in a door, at first I would like to have only "LookAT" and "Open", but when I open this I would like to change this Property to tell the program that now I can only "Close" it.
#3
oh that hurt  :'(

I'll probably try to write my own little customized module to read the AGS properties, store them somewhere and be able to change them, as the names of the properties I'm using are fixed.
Just a question, a real noobie one, can I make a global array of Strings? Like, "String my_properties[100]".
#4
Hi,
I can't find a way to change the custom Object (or Hotspot, Character or Inventory item, for that matter) properties. I mean, the ones that can be defined from the Room Objects page, clicking on "Properties...". I would like to change them in the middle of the game, from script.
There are these "GetProperty" and "GetTextProperty" functions, but how about Setting them?? I hope there is a way, cause if not all the hours I've put into this since the first day have been in vain  :(
#5
Yes, as I thought the mouse click is not processed, as the program is stuck in the while loop with the Wait function, and this effectively acts as a Blocking function. It exits the loop well though, thanks to the check to the button, and so the user is able to do something else after the first click.

It had an easy fix though. This is what I added to automatically run what the user wanted:

if (mb) // click -> walk was intercepted
{   
on_mouse_click(mb);
return 0; 
}

So now right before exiting the function with the 0, the program executes that click the user made.
Thanks a lot!!
#6
I don't have AGS with me right now so I didn't try it but it looks like it will work in the sense that the player will stop moving with a click, good thing!

But, will the mouse clicks be processed? It looks like there are big possibilities for the "click" to come in the Wait(1) function, so if that's a Blocking function wouldn't the call to the on_mouse_click be skipped?
Of course if it does skip it I could myself call it inside the respective IF.

I'll check the program this afternoon hopefully. Thanks anyways!
#7
Ok, I have a problem when I want my buddy to walk and do something after.
Let's say I have a Bluecup and want to Pick it up. After walking to the Bluecup, Instead of picking it up, I want him to say "too hot".

I'm using my own GUIs and MouseModes and everything that don't resemble at all anything from Sierra or Lucasarts. If, in the Pick Up interaction, I first define the Walk action as Non-blocking, and after that tell the guy to talk, he will say "too hot" right at the beginning, before reaching the cup. If I put a conditional like
if(!cEgo.Moving) DispMessage...
it won't do anything cause the program will check this IF once, right after the guy starts moving, and it won't enter.

The other option is to make the Walk Blocking. This works as the character reaches the end and then says "too hot" but it blocks EVERYTHING!! I want it to be possible that if the player changes his mind while the guy is walking towards the cup he can so something else or tell the character to go somewhere else. This is what Lucasarts games (at least fate of atlantis) do.

So I want it to be Blocking for the following actions in that interaction, but NOT for the rest of the game options. Any workarounds?

(In Hotspots there is this little nice feature so the player automatically walks to the hotspot when interacting, but it's totally blocking anyways, and the strange Action-GUI-Mode-Cursor thing I've written doesn't work too well with this feature).

I've thought about a key or something that can STOP all blocking functions. Does this exist?
Still something plainer, like a simple click, would be better.

Thanks!
#8
 :D That was so fast and worked!
I finally didn't use the variable, just checked if the GUI was visible at the same time as the mouse released, wich is the same idea.
Thanks a lot!
#9
Hi there,
I'm just starting to write a game and I'm having a bit of trouble when handling an event when a mouse button is RELEASED.
The thing is that I want a GUI window to appear when the right button is pressed, no problem there. I don't want the window to stay there when the button is released, I want to make it dissappear exactly when that right button is released.
I've done it this way after the GUI is visible with the click:

while (MouseRightButtonPressed = TRUE)
{
}
GUI.Dissapear();

This won't work because the program gets kind of stuck in the While-loop and the cursor won't move and nothing will happen while the button is pressed.
Another way I tried was to put a Wait(1) inside the While. This kind of works, but as the game goes into the Pause/Wait mode, the buttons in the GUI appear unavailable and don't change of image when I place the mouse above them, and this is exactly what I want to happen.
So I see no way around it... I can think of 2 possible ways but none work. One would be to somehow keep the program inside the While-loop but without blocking the usual mouse movements and GUI button behaviours. Another would be just to get rid of the While-loop, and create an event or function when the mouse button is released to make the GUI dissappear.
Any help?
Thanks.
SMF spam blocked by CleanTalk