Please login or register.

Login with username, password and session length
Advanced search  

News:

Forum rules - please read before posting, it can save you a lot of time.

Author Topic: On (MouseDown) ?  (Read 3533 times)

0 Members and 1 Guest are viewing this topic.

revvin

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 36
    • View Profile
On (MouseDown) ?
« on: March 13, 2005, 02:35:57 AM »

Hi guys,

Looking for some example script to perform a "On (MouseDown)" function...  i want to hover over an object - press and hold the right-mousebutton, where a verbcoin pops up - I then move to the verb I want - and release to action that verb on the object.

I hear the 3D Character demo has a similar thing - but I cant find the source anywhere?

Any suggestions appreciated

Cheers
Rev
Logged

deadworm222

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 197
  • Wintermute Army
    • View Profile
Re: On (MouseDown) ?
« Reply #1 on: March 13, 2005, 02:06:56 PM »

The source code for the 3D demo is in the wme_demo_3d directory.

LeftClick event means that the left mouse button has been pressed. LeftRelease event means that the left mouse button has been released. So the OnMouseDown function you are looking for is actually just a LeftClick function.

Like this:

Code: [Select]
on "LeftClick"
{

// do something

}
« Last Edit: March 13, 2005, 02:09:21 PM by deadworm222 »
Logged

revvin

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 36
    • View Profile
Re: On (MouseDown) ?
« Reply #2 on: March 13, 2005, 03:13:34 PM »

Ok cool. Didnt realise that was there! :)   I downloaded the 3D demo from www.dead-code.org and it was just compiled binary.

It looks like it has exactly what I want - I'll check out the source code and come grovelling if I get stuck! ;)

Thanks again
Rev
« Last Edit: March 13, 2005, 03:16:20 PM by revvin »
Logged

revvin

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 36
    • View Profile
Re: On (MouseDown) ?
« Reply #3 on: March 14, 2005, 01:15:33 AM »

That worked brilliantly! Thanks for your help.  ;D
Logged
 

Page created in 0.111 seconds with 24 queries.