Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: revvin on March 13, 2005, 02:35:57 AM

Title: On (MouseDown) ?
Post by: revvin 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
Title: Re: On (MouseDown) ?
Post by: deadworm222 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

}
Title: Re: On (MouseDown) ?
Post by: revvin 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
Title: Re: On (MouseDown) ?
Post by: revvin on March 14, 2005, 01:15:33 AM
That worked brilliantly! Thanks for your help.  ;D