Well, here have this(you can set any possible interface and combinations of them with this module).
Abstract:
You can set BASS,
(http://ugos.ugm.ac.id/wiki/_media/panduan:ubuntu_8.10_intrepid_ibex:games_ubuntu:beneath_a_steel_sky_-_2.jpg)
SCUMM
(http://images.fanpop.com/images/image_uploads/Monkey-Island-monkey-island-530473_640_400.jpg)
or Sierra interface
(http://agentbauer.uboot.com/mm/02/21/5678221/9273278098.jpg)
to your game, fast and easy with this module. You can even have combinations of those three. Example: Have BASS interface and Sierra like GUI.
Downloads
Control Modes V1.0a (http://www.mediafire.com/?mzywn2mddgb)
Trying to use the BASS module I ran into a problem with scrolling rooms, where I couldnt walk further to the right than the screenwidth coordinate. Ended up replacing "player.Walk(mouse.x, mouse.y, eNoBlock, eWalkableAreas);" with "ProcessClick(mouse.x,mouse.y,eModeWalkto);" and that fixed it. Just thought you should now if you wanted to update the module.
Quote from: magma42 on Wed 20/01/2010 22:37:56
Trying to use the BASS module I ran into a problem with scrolling rooms, where I couldnt walk further to the right than the screenwidth coordinate. Ended up replacing "player.Walk(mouse.x, mouse.y, eNoBlock, eWalkableAreas);" with "ProcessClick(mouse.x,mouse.y,eModeWalkto);" and that fixed it. Just thought you should now if you wanted to update the module.
Someone is using this module! Great I'll update it. Btw is 42 just a random number or ... you know..
Quote
bicilotti: Never say numbers near 42 in Dual's presence.
How make The Dig (LucasArts) interface? ???
First import the module.
Then you need is to find your mouse_on_click section in the globalscript script (not the header) and place only this (it should look like this, and there shouldn't be another on_mouse_click on the globalscript except for this)
function on_mouse_click(MouseButton *button) {
BASSFunctions.mouse_click(button,false);//exception on BASS: if you want left and right click reversed set reverse as true.
}
NOTE: BASS should have HandleInventoryScripts as false in the General Settings
I haven't played the dig, so I don't recall its interface. If it's similar to BASS somehow and someone might explain it to me, I'd be happy to implement it.
Quote from: Dualnames on Thu 28/10/2010 11:51:03NOTE: BASS should have HandleInventoryScripts as false in the General Settings
I assume you mean "Override built-in inventory window click handling" by that, Dual?
I'm running into a problem with the module. I suspect it's me not understanding how this works properly, so help would be appreciated. AGS version 3.2.0 by the way. Using BASS mode with the buttons reversed.
http://sslaxx.twu.net/Tester.7z - this is what I'm doing.
So, the game's set to change the pointer to eModeInteract on entering room 1. Fine, seems to work so far. Go to inventory, select the blue mug, click on OK, then click on the player. The cursor changes to eWalkTo, and then the inventory item(s) seem to become unselectable.
Help?
Insert this at line 97 of ControlModes.asc:
mouse.Mode = eModeInteract;
What happened is that upon de-selecting the inventory item, AGS moved to the next default cursor mode, in this case eModeWalk. Since you can't change the mode (as e.g. by right-clicking in the default game), you're stuck.
The problem is that you're using the reverse button order, i.e. if an inventory item is selected, you are supposed to right-click to use it and left-click to loose it (really unintuitive I'd say; I'd stick with a left click to interact/use items and a right click to examine/deselect the active inv). You left clicked to use the cup on Roger and actually de-selected the cup.
It's also worth noting that the module always calls the TalkTo event for characters, not the Interact event (I saw the interact roger test event).
---
Another way to deal with this problem is disabling eModeWalk.
Quote from: Khris on Tue 16/11/2010 16:38:22
Insert this at line 97 of ControlModes.asc:
mouse.Mode = eModeInteract;
What happened is that upon de-selecting the inventory item, AGS moved to the next default cursor mode, in this case eModeWalk. Since you can't change the mode (as e.g. by right-clicking in the default game), you're stuck.
The problem is that you're using the reverse button order, i.e. if an inventory item is selected, you are supposed to right-click to use it and left-click to loose it (really unintuitive I'd say; I'd stick with a left click to interact/use items and a right click to examine/deselect the active inv). You left clicked to use the cup on Roger and actually de-selected the cup.
It's also worth noting that the module always calls the TalkTo event for characters, not the Interact event (I saw the interact roger test event).
Thanks for that, Khris! I shall bear that in mind. And that change works nicely!
Dumb question time - how do you go about coding an object's interaction with another object to work with the left mouse button?
OK:
if ((reverse==false) && (click==eMouseLeft)|| (reverse==true) && (click==eMouseRight))
{
if (player.ActiveInventory!=null)
{
ProcessClick(mouse.x, mouse.y, eModeUseinv);
return;
}
ProcessClick(mouse.x, mouse.y, eModeLookat);
}
So swapping the eMouseLeft and eMouseRight conditions should work as I want, so let's give it a go... and no, it doesn't appear to work. I'm not entirely sure why, any ideas anyone?
Quote from: Sslaxx on Wed 17/11/2010 22:31:19
Dumb question time - how do you go about coding an object's interaction with another object to work with the left mouse button?
OK:
if ((reverse==false) && (click==eMouseLeft)|| (reverse==true) && (click==eMouseRight))
{
if (player.ActiveInventory!=null)
{
ProcessClick(mouse.x, mouse.y, eModeUseinv);
return;
}
ProcessClick(mouse.x, mouse.y, eModeLookat);
}
So swapping the eMouseLeft and eMouseRight conditions should work as I want, so let's give it a go... and no, it doesn't appear to work. I'm not entirely sure why, any ideas anyone?
This is the module's internal code. Can I have your code?
I'd like to rule that out now. First I haven't touched that module for like ages, and I did a small fix. I'm using it for hourgames, and never had a problem with that, but that doesn't mean jack shit. So well, what I'm trying to say, is that I barely recall it anymore, but I recall after some tests that everything worked fine.
I also have no idea, what is it you want to do.
This code is run with either the left or right mouse button. If you want this to run with the left mouse button that means you need to set reverse to false.
If you have an item, you'll get the useinv interaction instead.
Quote from: Dualnames on Wed 17/11/2010 23:57:20This is the module's internal code. Can I have your code?
I'd like to rule that out now. First I haven't touched that module for like ages, and I did a small fix. I'm using it for hourgames, and never had a problem with that, but that doesn't mean jack shit. So well, what I'm trying to say, is that I barely recall it anymore, but I recall after some tests that everything worked fine.
I also have no idea, what is it you want to do.
This code is run with either the left or right mouse button. If you want this to run with the left mouse button that means you need to set reverse to false.
If you have an item, you'll get the useinv interaction instead.
What do I want to do? As it stands, with the module, if I want to use an inventory item on another item I have to right-click on it - even though I've told the module to use the reversed BASS-type control system and would, therefore, expect
left clicking to work (as left clicking == interacting).
http://sslaxx.twu.net/ControlModesTest.7z is the code if you want to take a closer look (AGS 3.2.0). Note I made the change to your code that Khris suggested.
There fixed. That who the function inside the module should be. So replace. I've included the whole function. Also
override built-in inventory window click handling on General Settings should be set to true.
QuoteHowever, if you enable this option, then clicking on an inventory item in an Inventory Window will call your on_mouse_click function with eMouseLeftInv, eMouseMiddleInv or eMouseRightInv
That means because you had it the false, the code wasn't even being runned as i checked. But regardless it needed a fix.
static function BASSFunctions::mouse_click(MouseButton click, bool reverse){
//handle true
Hotspot*htsp=Hotspot.GetAtScreenXY(mouse.x, mouse.y);
InventoryItem*invitem=InventoryItem.GetAtScreenXY(mouse.x, mouse.y);
if (InventoryItem.GetAtScreenXY(mouse.x, mouse.y) != null) {
if ((reverse==false) && (click==eMouseLeftInv) || (reverse==true) && (click==eMouseRightInv)){
invitem.RunInteraction (eModeLookat);
}
if ((reverse==false) && (click==eMouseRightInv) || (reverse==true) && (click==eMouseLeftInv)){
if (player.ActiveInventory!=null) {
invitem.RunInteraction(eModeUseinv);
}
mouse.Mode=eModeUseinv;
player.ActiveInventory=invitem;
}
return;
}
if ((reverse==false) && (click==eMouseRight)|| (reverse==true) && (click==eMouseLeft)) {
if (player.ActiveInventory != null) {
ProcessClick(mouse.x, mouse.y, eModeUseinv);
return;
}
if (Character.GetAtScreenXY(mouse.x, mouse.y) != null) {
ProcessClick(mouse.x,mouse.y,eModeTalkto);
return;
}
if ((htsp!=null) && (htsp.ID>0) || (Object.GetAtScreenXY(mouse.x, mouse.y)!=null)) {
ProcessClick(mouse.x,mouse.y,eModeInteract);
return;
}
ProcessClick(mouse.x,mouse.y,eModeWalkto);
}
if ((reverse==false) && (click==eMouseLeft) || (reverse==true) && (click==eMouseRight)) {
if (player.ActiveInventory != null) {
player.ActiveInventory=null;
mouse.Mode = eModeInteract;
return;
}
ProcessClick(mouse.x, mouse.y, eModeLookat);
}
}
Quote from: Dualnames on Thu 18/11/2010 00:47:23
There fixed. That who the function inside the module should be. So replace. I've included the whole function. Also override built-in inventory window click handling on General Settings should be set to true.
QuoteHowever, if you enable this option, then clicking on an inventory item in an Inventory Window will call your on_mouse_click function with eMouseLeftInv, eMouseMiddleInv or eMouseRightInv
That means because you had it the false, the code wasn't even being runned as i checked. But regardless it needed a fix.
Quote from: Dualnames on Thu 28/10/2010 11:51:03NOTE: BASS should have HandleInventoryScripts as false in the General Settings
You said this earlier. But
this refers to the same setting.
More pertinently, this still does not address the issue I've raised about interactions with inventory objects being inconsistent using the reversed BASS control system. To summarise:
* Left click to interact/talk to/walk to, right click to examine (with the reversed BASS control system).
* Logically, interacting with a hotspot with an inventory object should therefore use the left mouse button, yes?
* But it does not. It uses the right mouse button (examine) instead. This is not intuitive regarding the buttons functions.
Oh, sorry man, Xenogia also contacted me about this like 2 months ago, and I set up the module to his needs. Okay, see the code above your post. I've edited, so replace. It should work just fine now.
Hello!
I would like to use reversed BASS control. Everything are fine... .... except with the inventory :/
Right click(examine) is okay, but left click(interact) is not. When I interact with an item on my inventory, the cursor totally disappears. I set to "true" the "Override built-in inventory window click handling" in the general settings. The problem still here, the cursor disappears when I click on an item in my inventory :(
Anyway, I use AGS 3.2, and my game is very simple. I just use a default game to test this module.
Try replacing ControlModes.asc and ControlModes.ash with the files from http://sslaxx.twu.net/ControlModes.zip and see what happens, RoliX.
Quote from: Sslaxx on Wed 02/03/2011 19:52:51
Try replacing ControlModes.asc and ControlModes.ash with the files from http://sslaxx.twu.net/ControlModes.zip and see what happens, RoliX.
I replaced them with your files, but it still doesn't work :/ I have totally no clue about the issue..
Here is my source files if you're interested: http://www.sendspace.com/file/qv9rj5
RoliX, doesn't this http://www.adventuregamestudio.co.uk/yabb/index.php?topic=38762.msg559900#msg559900 , solve your problem?
EDIT: I just saw your source files.
I've already tried that, but still doesn't work properly. I spent hours to fix that, but not much success... I can't see what's the problem, I'm beginner in scripting :/
Quote from: RoliX on Thu 03/03/2011 09:12:06
I've already tried that, but still doesn't work properly. I spent hours to fix that, but not much success... I can't see what's the problem, I'm beginner in scripting :/
Okay, it appears there's no problem. When you left click on an item, it changes the item to that cursor's image. Now, if that's not what you want let me know, but anyhow. So since that item (the blue cup) has no cursor image assigned to it. It makes the mouse cursor completely invisible. All you need to do therefore is set an image.
It seems if the item's cursor image is "0" (e.g. blue cup), the cursor will disappear ingame. If I set the cursor image to other sprite, everything perfect. I didn't know this, next time I will test with key :)
I'm so sorry for bothering you with such a stupid thing :-\
And also thanks for the help and for the great module. This control will rock in my game :D
Quote from: RoliX on Thu 03/03/2011 15:40:43
It seems if the item's cursor image is "0" (e.g. blue cup), the cursor will disappear ingame. If I set the cursor image to other sprite, everything perfect. I didn't know this, next time I will test with key :)
I'm so sorry for bothering you with such a stupid thing :-\
And also thanks for the help and for the great module. This control will rock in my game :D
Don't worry about it. It's no bother really. ;)
Hi! I am using the BASS reversed for my adventure game project. And it's mostly working perfectly, but I've stumbled upon one problem:
I can't seem to be able to use inventory items on other inventory items. I am using the exact code Dualnames posted earlier. Does the BASS module support inventory items on inventory items and how do I enable it?
Unfortunately, this module is a bit of a mess. Check the posts at the bottom of the first page, others had the same problem and it was already dealt with there.
Quote from: Khris on Wed 25/05/2011 15:30:06
Unfortunately, this module is a bit of a mess. Check the posts at the bottom of the first page, others had the same problem and it was already dealt with there.
Yep. Khris is right, I'll try and fix this in the next few days. In the meantime read this topic and you may be helped.
Now I might be a total noob, but I can't find the solution in the thread. The problem is really weird. I can pick up inventory item 1 and use it on inventory item 2 if the code is as follows:
function iChain_UseInv()
{
cEgo.LoseInventory(iRope);
cEgo.LoseInventory(iChain);
cEgo.AddInventory(iDevice);
cEgo.Say("It worked!");
}
But since this makes every inventory item transfer the iRope and the iChain to a iDevice, I want to do it like this:
function iChain_UseInv()
{
if (cEgo.ActiveInventory == iRope) {
cEgo.LoseInventory(iRope);
cEgo.LoseInventory(iChain);
cEgo.AddInventory(iDevice);
cEgo.Say("It worked!");
}
else {
cEgo.Say("There is no point in using that on that.");
}
}
and this:
function iRope_UseInv()
{
if (cEgo.ActiveInventory == iChain) {
cEgo.LoseInventory(iRope);
cEgo.LoseInventory(iChain);
cEgo.AddInventory(iDevice);
cEgo.Say("It worked!");
}
else
cEgo.Say("No.");
}
But then it jumps straight to the else function and says "No" or "There is no point...". It's as if the mouse actions in the inventory suddenly are allergic to "if's"! Now this might be completely unrelated to the module, but it worked fine before I added it (via function on_mouse_click, BASSFunctions etc.). If its unrelated I am sorry I bothered you! :)
I don't really get the problem, but shouldn't cCooper be cEgo? I mean how could could Ego use something on the rope when the rope actually belongs to Cooper?
Yeah, that was just a mispelling here, in the game cEgo is cCooper in every instance. So thats not whats causing the problem :)
It appears the problem was with my horrible coded Broken Sword-inventory. The module works perfectly! :)
TOC, TOC!!
Anybody there?
:P
I wanted try the module, but ...
Oh! My god (recurrent phrase for many situations)
The download dosen't work. :'(
Help me, please! Help me!
http://duals.agser.me/Files/Control_Modes.rar
There. I think that's a bit older version, so read this topic in case you're having issues with certain stuff.
Thanks! :D
I used the module in a simple room and it works fine like promises:
Left click to examine objects/hotspots/characters and right click is for walk/talk to/use.
But ...
To be (just a little more) like as the original with left click should do character walks, too.
Anyway, as I said, works fine.
Now I´ll try to do that hotspot/character/object name popup next to icon mouse.
Many thanks, again!