![]() |
Problem with Custom Inventory
PHP Code:
|
I would use GuiShowImg and add a hint = "" to it.
|
Can you show me an example I have never used it before. =/
|
PHP Code:
|
PHP Code:
EDIT: NVM WORKS FINE. I just had to delete gx, and gy. |
Is there a way to make the Hint overlap the mouse..?
and why doesnt this work? PHP Code:
|
mousex and mousey are in tiles which show where the mouse is in the level. Gui controls use pixels because they're not in a level. You should use mousescreenx and mousescreeny which are also in pixels and represent where the mouse is on the screen not the level.
If that doesn't fix it then you should be more specific about the problem. |
PHP Code:
This won't work.. Also is it possible to put a function in a for statement because I don't want to make 20 function InvItem_x.onMouseDown's. |
Lookup catchevent on the wiki if you're working with GUI's
And what do you mean by equip? |
By equip i mean selectedweapon = index of weapon i want equipped.
|
Quote:
PHP Code:
PHP Code:
|
Thanks how about my other question:
Also is it possible to put a function in a for statement because I don't want to make 20 function InvItem_x.onMouseDown's. I don't really understand how the catchevent works? |
PHP Code:
PHP Code:
|
Quote:
PHP Code:
|
Quote:
|
The first parameter of catchevent should be a string (the object's name) not an object variable.
catchevent("InvItem_0", "onMouseDown", "onItemSelected"); or catchevent(InvItem_0.name, "onMouseDown", "onItemSelected"); If it works with the variable it would be because it takes the object name from the variable. |
Well, it's nice to pretend that Graal works on objects for this, not strings, I suppose.
Only way I can see strings being an advantage is if the object isn't yet defined? |
Thanks. It worked like a charm.
New Q: Is there anyway to make the hint variable appear faster? |
Quote:
|
| All times are GMT +2. The time now is 09:33 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.