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

#41
To be more precise, in my on_mouse_click function I have:
    ProcessClick(mouse.x,mouse.y, mouse.Mode);

I tried setting "Override built-in inventory window click handling" to TRUE.
Now the mouse cursor doesn't change into that of the item's cursor graphic, but other events from the item's event handle panel doesn't happen anyway.
#42
Quote from: Crimson Wizardwhat is written in your on_mouse_click function regarding inventory?
Nothing about inventory. Maybe there should be?
I'll try out that other thing you pointed out.
#43
Thank you for this both usable and doable solution, Khris.


I am getting increasedly mystified about how the inventory window works, since I would have expected something like using "Interact inventory item" from the event handle panel to work, and have started a new thread on it. But this solution works for its purpose and thats the important thing!

Thank you again.
#44
There's a lot of things I dont understand about the inventory window.

I am trying to create a game with a perpetually open inventory GUI on the right side of the screen. I plan for the user to select items from the inventory window, then use items directly onto the game screen without opening and closing the inventory GUI.

My default cursor is eModeInteract since there will be no walking around in this game.

I can select an inventory item with the mouse cursor, and the cursor changes into the mouse cursor graphic of that inventory item. I can then use said inventory item on hotspots and objects as usual.

But, I also want other things to happen when I click on the inventory items with the eModeInteract mouse cursor.
This is where it gets strange. Even though I script for something to happen when interacting with inventory item, it doesn't. At the event handle panel for a given inventory item, like my iAcorn, I put something in the global script to happen for the event of "Interact inventory item" (and yes, I have remembered to use the event control panel of the item as well). When clicking the mouse cursor (in eModeInteract) at the image of iAcorn on the inventory window, the cursor changes to the CursorImage of iAcorn, but nothing else I scripted happens.
I dont understand why not?

Also, if I make a default cursor graphic for eModeUseinv, the cursor hotspot insists on being at 0,0 instead of the cursor hotspot coordinates I give it. Why wont the cursor hotspot obey?

And yet another thing: For experimenting, I put something in the item's event panel to happen when player should "Look at inventory item". Now, if I right-click on the inventory item, the designated stuff to happen for "look" happens, even though I am not using the eModeLookat cursor and there is not even anything scripted to happen for right-clicks in my game (I am using the blank game template and have nothing scripted for any right-clicks). Yet right-click makes the player look at the inventory item. Huh?

I understand nothing. Me no unnerstand.

I consider re-writing an inventory GUI from scratch using buttons and such, but its timeconsuming. I'd much rather understand why the inventory window doesnt act the way I would expect?
#45
In the standard game template, the inventory GUI has an InventoryWindow. When selecting an item on this window, the cursor changes to that of the item, and that is well.

I want the GUI to disappear right when I select an item, not only when clicking the button btnInvOk. How can I change this?
#46
Hm, doesn't work for me. Dunno what I'm doing wrong.

I can make simple commands work, like the Display command, so it's not the GUI not being clickable or something like that, but the ShellExecute command wont work for me (wtf)
#47
This engine is the coolest (laugh)

Thank you, Khris, you're always there to help me out of little fixes like this. I really appreciate it.
#48
Wait, one more :cheesy:

Can I insert a hyperlink into AGS?
I mean, can I make AGS open default browser and find a certain webpage?
#49
GUI's work, albeit with a warning since I have to make them bigger than the screen, but I haven't got time for proper solutions with this :-\
I'll stick with it, and thank you very much for your contributions.
#50
Thank you very much for this solution, Khris, and for the hint, CaptainD.

Having slept on it, I think I'll also try using non-clickable versus clickable GUI's on top of each other.

I'll try out everything ;)

Thanks again.
#51
I have put a neat little feature in my christamas spoof for the office where, whenever the mouse moves over a certain hotspot, the cursor changes. I use the mouse.Mode = eModeUseInv and change the players active inventory accordingly with functions like "hHotspot2_MouseMove()". That has worked so far.

However, in a certain room I put some objects that cover the entire room, and now the hotspots seem to be "missing" in some way. At least the game somehow no longer reacts to the mouse being on top of the hotspots.

I also tried making the game check for mouse x,y-coordinates in rep_exec, and change the cursor and mouse mode whenever mouse position was at certain location. This doesn't work either.

I have a feeling that the objects that cover the screen somehow prevent other functions from carrying out. What could be causing this?
#52
This is the kind of thnig that makes me go all fanboy just like Syndrome. This is so COOL  (laugh)
#53
Thank you, but I've tried SCIstudio and its really simple and works for me. I'll stick with that for the time being but pin your link in my archive   ;)
#54
Success, my collegaues love it :-D

Thank you for your help.
#55
I tried that and it didn't work.

Then I tried it again and it worked. I should have just tried it twice before asking :-[

Thank you again.
#56
Oh wait, one more thing...

Can I specify the location of the PDF file I want to open relative to the game directory?

Rather than opening the letter.pdf at "c:\\letters\\letter.pdf", I'd like to do something like simply asking AGS to open "letter.pdf" in the same directory as the game files. This would allow me to bring the game with me on a memory stick without needing to edit what location the game should look for the pdf at.
#57
Thank you for helping with the ShellExecute command. Sorry for the quote.
#58
Wow, thats really something.
I got it and added it to AGS, also right-clicked and chose "use this plugin". But I'm unsure how to use the command.

Edited by mod: Please don't quote the whole previous post.
#59
And thanks for editing the typo, Snarky   (laugh)
#60
Thank you. Very interesting.
SMF spam blocked by CleanTalk