ID:273667
 
Is there a way to send the right click to click procs without doing it through the interface?

Maybe with script or something?

Thanks in advance.
You can by utilizing params2list() and the params in the Click() proc, like so:

client/Click(object, location, control, params)
{
var data[] = params2list(params);
if (data["left"])
{
// Left-Click.
}
if (data["right"])
{
// Right-Click.
}
}
In response to Maximus_Alex2003
I have already written the code but to enable the right click to work I need to check the box in interface(map options) that says send right click to click proc, but I can only find that on a custom interface (which I don't have or want to make).

What I'm looking for is a way to enable that setting without making a new interface?

Any ideas?
In response to Kozar's friend
By default, you should be able to have anything on the map interact with the Click(), checking the params's for "right" and "left".
In response to Maximus_Alex2003
You would have though so, but when i run the game, left click works still, but nothing on right click.. heres what ive got:

mob
John
icon = 'player.dmi'
density = 1
Click(location,control,params)
var/list/p=params2list(params)
if(p["right"])
usr << "Right-Clicked!"
if(usr.RIGHTCLICK=="Meteor")
var/obj/Spells/F = new /obj/Spells/MeteorOne(src.loc)
sleep(10)
del F
var/obj/Spells/G = new /obj/Spells/MeteorTwo(src.loc)
sleep(7)
for(var/mob/M in world)
if(M.loc==locate(G.x,G.y,G.z))
M.health -= usr.meteorlevel*10
M.healthcheck()
del G
if(p["left"])
if(usr.LEFTCLICK=="Attack")
walk_towards(usr,src,1)
// flick("attack",usr)
// sleep(10)
// src.HP -= usr.Str
// src.Deathckeck()
if(usr.LEFTCLICK=="Fireball")
usr.LEFTCLICK = ""
// if(usr.mana >= 5)
// usr.mana -= 5
var/obj/Spells/F = new /obj/Spells/Fireball(usr.loc)
F.target = src
F.owner = usr
var/mob/M = F.target
walk_towards(F,M.loc,2)
sleep(20)
del F
if(usr.LEFTCLICK=="")
usr.LEFTCLICK = "Fireball"
F.level = usr.firelevel

the left click works fine, but im not sure if that is because the param is correct or because its not checking due to me not having a new interface with the box checked.
In response to Kozar's friend
You could always go into...

My Documents -> BYOND -> Skins -> BYOND

...and copy the default skin file and check the box >_>
In response to Spunky_Girl
OMG, lol.. i was wondering where i might find the default skin... the BYOND folder never even occurred to me (It's quite late here (2:20 am))

Thanks :)