The issue isn't icons, I use icons larger than 32x32 on a 32x32 grid and click works fine, only issue is density doesn't carry over. The riddle crossing game I made for the GIAD uses very large icons on a 32x32 icon-size and clicking any part of them works.




Replace location with locate(location.x,location.y,location.z) if you want to live.


Rushnut wrote:
You cannot accomplish what he wants with just Click()
What if I told you that Click() is working for him, and we don't really know why?

F_A's library is

1: buggy as hell
Yes, I totally need to write another one like it!

2: not native at all
When I said native, what I meant was that the library is written entirely in DM, with no other language being used to implement the system. A solution written entirely in DM has the benefit of working for 100% of the connected clients, but if you rely on JavaScript, you can't guarantee it will work for every client. I would say the JavaScript solution is far more efficient however, so the ideal thing to do would be to combine the systems so that if a client doesn't have JavaScript enabled, it will backfall to the more native DM solution. This way, you have as much efficiency as possible, while still supporting all potential clients.

Oh and not to mention, the overhead is pretty minimal.
Sure if you think checking the mouse coordinates and updating one or more vars every single tick is minimal. I see it as a whole lot of intensive processing that should only be used if you actually need it.
In response to Multiverse7
HDK's implementation actually only updates the pixel coordinates on mouse movement, not every tick.

Yes it uses JS, I was aware of this but kind of just forgot it, I guess you have a valid point there.

And if it's working then it goes against everything I've ever done in DM before, but that wouldn't be for the first time so wotevr.
Hurry they are getting closer, take my hand.
In response to Jittai
Jittai wrote:

Replace location with locate(location.x,location.y,location.z) if you want to live.


It doesn't accept those variables.

usr.loc = locate(object.x,object.y,object.z)

Just realized you're calling location which is the less ideal. Try object instead or to set location as a turf before hand.
Rushnut wrote:
HDK's implementation actually only updates the pixel coordinates on mouse movement, not every tick.

Of course not. Why would you update if nothing changes? All you have to do is constantly move the mouse around the screen, and as long as that's happening, then yes, it will be updating every single tick. How do you consider that to be efficient, when it has to send all that information to the server?
In response to Jittai
Jittai wrote:
usr.loc = locate(object.x,object.y,object.z)

Just realized you're calling location which is the less ideal. Try object instead or to set location as a turf before hand.

It also doesn't accept this. :\
What are you entering in exactly? Are you defining object as var/atom/object ?

 client
Click(var/atom/object,location,control,params)
var/list/p = params2list(params)

if(p["middle"])
//Warp
if(usr:warping)
if(usr.chi >= 4)
flick("Warp",usr)
usr.chi -= 4
spawn(3)
usr.loc = locate(object.x,object.y,object.z)
return
else return
In response to Multiverse7
Multiverse7 wrote:
Rushnut wrote:
HDK's implementation actually only updates the pixel coordinates on mouse movement, not every tick.

Of course not. Why would you update if nothing changes? All you have to do is constantly move the mouse around the screen, and as long as that's happening, then yes, it will be updating every single tick. How do you consider that to be efficient, when it has to send all that information to the server?

Insert a way of updating the pixel coordinates of the mouse, without changing the vars when the mouse moves here:
( )
Best response
Just tested this and it works.

client
Click(var/atom/object,location,control,params)
var/list/p = params2list(params)
..()
if(p["middle"]) && usr:warping && usr.chi >= 4)
flick("Warp",usr)
usr.chi -= 4
spawn(3) usr.loc = locate(object.x,object.y,object.z)


In response to Jittai
Also, as an addition to what Jittai posted, if there's a movable atom standing on top of the turf you clicked, you won't be able to teleport to that location.
It works when I clicked objects not sure if /movable matters in this case. :I

Also moral of the story is, don't refer to turf.loc Idk why but I learned this early and just use locate(x,y,z) since.
Rushnut wrote:
Insert a way of updating the pixel coordinates of the mouse, without changing the vars when the mouse moves here:

1. Wait for Tom and Lummox JR to implement some kind of client/world, in which case a var could be updated only on the client's end.

2. Avoid mouse tracking at all if you can, and just use a proc such as Click().

3. Update the vars and deal with all the lag. In some cases mouse tracking is needed and there is just no way around it, but this doesn't seem to be one of those cases.
@Multiverse1 and Rushnut: No point in continuing as Jittai has already offered a solution to his problem.
In response to Multiverse7
So you're saying, to have mouse tracking, there is no current way of doing it other than to update the vars when the mouse moves?


Atheists: 1 Manchester united: 0
Get to the choppa. Before the speeding derailed train rolls over and crushes you.
In response to Jittai
Jittai wrote:
Get to the choppa. Before the speeding derailed train rolls over and crushes you.

SHUT UP WITH THE TERMINATOR REFERENCES YOU'RE GOING TO GIVE ME AN ANEURYSM.
In response to Jittai
Jittai wrote:
    Click(var/atom/object,location,control,params)


That made the difference.

I'm trying to save Khye from you and multiverse derailing up this thread. Not only are you guys arguing something in the most retarded and hostile manner but it has 0 validity to the issue the op was having.

@Khye: Yeah the error you were probably getting was from trying to use x,y,z with out actually establishing that "object" as a var was in fact an atom.
Page: 1 2 3