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

#1
I'm having a slight problem with inventory items, and I suspect it has something to do with the way I have right and left clicks set up. When I take an item out of the inventory, and the cursor becomes the inventory image, I can't get the cursor to change back until I've used the item on the correct hotspot. This means that my normal "Interact hotspot" functions will not work, because the cursor is stuck in the use inventory mode. What can I do?
#2
Great, everything's working now, thanks alot for all your help.
#3
No, I think I must have deleted it. What would the code for that be?
#4
There's nothing else under on_mouse_click at all, besides the stuff I posted.
#5
Alright, the on_mouse_click section of the script now looks like this:

Code: ags
function on_mouse_click(int button) {
if (button == LEFT) {
Ã,  GetLocationName(mouse.x, mouse.y, buffer);
Ã,  if (StrComp("", buffer) == 0) ProcessClick(mouse.x, mouse.y, MODE_WALK);
else if (player.activeinv > 0) ProcessClick(mouse.x, mouse.y, MODE_USEINV);
Ã,  else ProcessClick(mouse.x, mouse.y, MODE_USE);
}


I think I've followed everything you've said correctly. If not, I thought posting this might help. At this point, for some reason, a right click will not open the Inventory GUI anymore, in addition to the left clicks on hotspots not resulting in the assigned "Interact hotspot" interactions. Sorry for all this trouble, but I'm very confused.

EDIT: Ah, I was mistaken, the normal "Interact hotspot" interactions are now working as they were before, but the Inventory GUI won't open with the right click.
#6
Yes, I noticed the missing comma and fixed it. Using an inventory item on anything I've assigned an interaction to (main character, other characters, hotspots) will work just fine, it's just the normal "Interact hotspot" interactions that aren't working. I didn't change player characters.
#7
Yes I am. The interactions don't work even at the start of the game when inventory interactions haven't been used.
#8
Yes, I'm still using 2.6

I put this in the script, and now I got the inventory item interactions to work, but the character won't respond to his usual left click interactions that don't involve inventory items. Is there something else I need to add to the script?
#9
Sorry to bother you all with this again, but I've just gotten to the point where I'm adding an inventory item that the player will be using on the main character. But there's a problem: when I try to use the item on the character, it just displays the message that I assigned to his "Interact" mode. I realize this is because I did that scripting to make all left clicks "interact". How can I change the scripting to get around this problem?

I will try to explain my problem more if I'm not clear enough.
#10
I am using 2.6, and I have made all the changes that you said to with this version, but now there is another problem:

Error (line 50): Parse error in expr near 'mouse'


Line 50 looks like this:
else ProcessClick(mouse.x, mouse.y MODE_USE);
#11
I appreciate the replies. I tried making the changes that Elliott suggested to the script, and I received an error message after trying to save my game:

Error (Line 45): undefined symbol 'eMouseLeft'

What am I doing wrong? Thanks again for the help.
#12
Hello,
I have some ideas for a game I'm working on and I'm having alot of trouble. I'm unable to do any scripting at this point, so if it's possible I'd like to keep it as simple as possible.
What I would like to do is to get rid of the icon bar GUI completely, and have only one mouse cursor that the player can use in my game. Right clicking will open the inventory, and left clicking will cause the main character to interact with whatever is clicked on. I can't figure out how to do this, and I would really appreciate some help. Sorry if my explanation of what I'm after was confusing, I'll try to elaborate if there's confusion.
Thanks
SMF spam blocked by CleanTalk