Left-Click interact, Right-Click look Interface

Started by PsychicHeart, Sun 05/03/2006 01:44:31

Previous topic - Next topic

PsychicHeart

Hey,
i have been looking in the manual and on the forum for a while now, looking for a way to have a system like this:
Left click will interact
Right click will move

Can this be done? And if so, can someone give me a straightforward way to do it?
Thanks,
FB.
Formerly known as Flukeblake, Flukezy etc.

monkey0506

#1
Code: ags
function on_mouse_click(MouseButton button) {
  if (button == eMouseLeft) ProcessClick(mouse.x, mouse.y, eModeInteract);
  else if (button == eMouseRight) ProcessClick(mouse.x, mouse.y, eModeWalkto);
  }


That's a very simplistic method of doing it, but it should work.

[EDIT:]

I forgot to include coordinates in the ProcessClick function calls, so I fixed it.

PsychicHeart

#2
thanks

EDIT:
oh wait, i get the error message: Not enough parameters to call in function.
What should i do?
Formerly known as Flukeblake, Flukezy etc.

Gilbert

ProcessClick() requies the coordinates parameters:

ProcessClick(mouse.x, mouse.y, eModeInteract)

ProcessClick(mouse.x, mouse.y, eModeWalkto)

monkey0506

Sorry...didn't look the function up...forgot about the coordinates.

LimpingFish

#5
I believe there is a module for this.

Hmm, can't find it now...

EDIT by Ashen:
The (slightly old) ALARCOST template on What Was Rui's Page.
Steam: LimpingFish
PSN: LFishRoller
XB: TheActualLimpingFish
Spotify: LimpingFish

SMF spam blocked by CleanTalk