[VERIFIED] onClick JS event no longer works

Found a bug in UOX3? Or experienced a server crash? Perhaps you've noticed a broken feature? Post the details here!
Post Reply
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

onClick JS event no longer works

Post by Xuri »

Topic says it all, really. Assigning a script looking like this...

Code: Select all

function onClick( pUser, iUsed )
{
	pUser.SysMessage("You have clicked on: "+iUsed.name );
}
...to an item, and then clicking on said item once, doesn't display the SysMessage from the script. :P

Also, is onClick only for items, or would it work (when working) for characters as well?
Last edited by Xuri on Sat Nov 26, 2005 11:16 pm, edited 2 times in total.
-= Ho Eyo He Hum =-
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

Currently onClick is only for items, though I am of the opinion there should be functionality for both Items and Characters on a single-click event.

As for the problem, I'm looking but so far everything looks as though it should work fine.
Scott
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

Ahh, ok...

Technically, on UOX's side, this is working perfectly.

The problem is that on an AoS client, single click no longer exists while AoS features are enabled. Thus without the tool tips, you can still perform actions on Single Click (or do whatever you like, basically), as we are still getting a single-click packet.

However with the ToolTips enabled (which are enabled by enabling AoS features in the client) We don't get that single-click packet, ever. Rather we get a tooltip request packet, to which we respond with the proper information.

As for attaching an event to that packet, I would be hesitant since a person can set it to request that info on mouseover (that's actually default), Which would cause alot of requests on that event.
Scott
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

Would be nice to have still, though. Heh. =P Bloody AoS features.. *mumbles*
-= Ho Eyo He Hum =-
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

I have the feeling that once the functionality is there to do it, most will disable AoS features alltogether.

But I concurr, seems like a waste to have all that single-click code that doesn't even get used currently.
Scott
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

Well, wouldn't it be posssible to set it up similar to onUse, and allow the scripter to do a "return false" or true or whatever it is to return to code and make it continue there as normal?
-= Ho Eyo He Hum =-
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

Any chance of this event working again now that we specifically send item names from the server? :P
-= Ho Eyo He Hum =-
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

Not really, we have 'NO' way of picking up a client single-click in an AOS client. The best we can possibly do is give you a way of changing the name sent to the client when the object is sent (which is when you come in-range).
Scott
Post Reply