ID:132670
 
Can the Screen-Loc of a cursor's current position on the screen be added in the params list of the MouseDrag() function?
In response to Crashed
Since when?

I know MouseDown and MouseUp had them,

but on the version of BYOND I'm using params does not contain screen-loc for MouseDrag()

edit: in fact I just tested it with the latest version of byond and can verify the only thing that params contains apparently is the name of the map you are on?
In response to Obs
You know I also just realized this doesn't even tell you if the MouseDrag was done with the right mouse button or the left mouse button.


This is really making life difficult.

For instance, suppose you want to make a left click mouse drag on an object do one thing, and a right click mouse drag on that same object do something else.
In response to Obs
Obs wrote:
You know I also just realized this doesn't even tell you if the MouseDrag was done with the right mouse button or the left mouse button.


This is really making life difficult.

I think you may be doing it wrong. I ventured into the 'screen-loc' area a few months ago and the 'right' area only a week or so ago. Unless something has changed since then, I can assure you that they work.
In response to Hiro the Dragon King
Post code then.


If I do this under client

<code> MouseDrag(over_object,src_location,over_location,src_control ,over_control,params){ world << "params has [params]"; } </CODE>


I get an output of this:

params has default.map1


Which means the params list only has that bit of data apparently.
In response to Obs
Obs wrote:
Post code then.


If I do this under client

<code> MouseDrag(over_object,src_location,over_location,src_control ,over_control,params){ > > world << "params has [params]"; > > } > </CODE>


I get an output of this:

params has default.map1


Which means the params list only has that bit of data apparently.

First of all, use DM tags.

Second, I am going to guess that your problem is that that is defined under client when that is in fact how to define it under an atom.
client
MouseDrag(src_object,over_object,src_location,over_location,src_control,over_control,params)
var{P[]=params2list(params);S=P["screen-loc"]}
if(!P["right"]) world << "Left: [S]"
else world << "Right: [S]"

area/turf/object/mob
MouseDrag(over_object,src_location,over_location,src_control,over_control,params)
var{P[]=params2list(params);S=P["screen-loc"]}
if(!P["right"]) world << "Left: [S]"
else world << "Right: [S]"
</dm>
In response to Hiro the Dragon King
Yea I guess the parameters had been wrong