Scripts / How to g_MouseWheel?

Author
Message
Moshroom
9
Years of Service
User Offline
Joined: 18th Jul 2015
Location: Finland
Posted: 14th Dec 2015 21:26
Going through the new commands. I already managed to guess how the g_MouseClick works, but g_MouseWheel seems to do nothing. How is it supposed to work?
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 14th Dec 2015 21:32
if g_MouseWheel < 0 then
--scrolling down
elseif g_MouseWheel > 0 then
--scrolling up
end
life\'s one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, AMD R9 200 series , directx 11
perelect
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 15th Dec 2015 01:30
Yep, this is what I done, its in its own function and it returns the counter value.



Has anyone had any luck working out the g_PlayerGunMode values?
Desktop: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz (8 CPUs), ~3.6GHz, Windows 8.1 64-bit, 16 GB Ram, NVIDIA GeForce GTX 750 Ti, Display Memory: 4018 MB. Resolution 1360x768, Passmark 3528.
Laptop: Pavilion dv6 Notebook, Intel(R) Core(TM) i5-2410M CPU @ 2.30 GHz, Win 7 64 bit, 16 GB Ram, Radeon (TM) HD 6490M, 2336 MB Memory. Resolution 1366x768, Intel(R) HD Graphics 3000. (WEI 5.8)
Corno_1
GameGuru Tool Maker
14
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 15th Dec 2015 16:21
Quote: "Has anyone had any luck working out the g_PlayerGunMode values?"

Not hundret percent sure, but they stand for animation phases

But I need more time to test this thesis...
My dream is to develope games, which makes fun when I create it and fun when other people play it.
PM
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 15th Dec 2015 16:41
I think it was explained in the last twitch broadcast.

1 - left mouse button
2 - right mouse button
3 - both mouse buttons
4 - scroll wheel press
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

Moshroom
9
Years of Service
User Offline
Joined: 18th Jul 2015
Location: Finland
Posted: 15th Dec 2015 20:26 Edited at: 15th Dec 2015 20:47
Quote: "if g_MouseWheel < 0 then
--scrolling down
elseif g_MouseWheel > 0 then
--scrolling up
end"

That was the second thing I tried and it has no effect at all. For diagnostics I did this:
And it just gives me 0 no matter what I do.
perelect
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 15th Dec 2015 20:42
Quote: "That was the second thing I tried and it has no effect at all."


Hi Moshroom

If you are not seeing any values other than zero, you might not of called..
ActivateMouse() -- lua has control of the mouse

The mouse wheel scroll only gives feedback in this mode...

Maybe this is it?
Desktop: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz (8 CPUs), ~3.6GHz, Windows 8.1 64-bit, 16 GB Ram, NVIDIA GeForce GTX 750 Ti, Display Memory: 4018 MB. Resolution 1360x768, Passmark 3528.
Laptop: Pavilion dv6 Notebook, Intel(R) Core(TM) i5-2410M CPU @ 2.30 GHz, Win 7 64 bit, 16 GB Ram, Radeon (TM) HD 6490M, 2336 MB Memory. Resolution 1366x768, Intel(R) HD Graphics 3000. (WEI 5.8)
Moshroom
9
Years of Service
User Offline
Joined: 18th Jul 2015
Location: Finland
Posted: 15th Dec 2015 20:55 Edited at: 15th Dec 2015 20:59
Ok thanks, now it works. Weird, since g_MouseClick works even when ActivateMouse() hasn't been called. IMO it would be logical if g_MouseClick and g_MouseWheel behaved the same way.

Edit: I think the only thing ActivateMouse() should do is to show cursor and activate g_MouseX and g_MouseY. I can't think any reason to make other mouse controls not available all the time.

Login to post a reply

Server time is: 2024-12-22 09:57:34
Your offset time is: 2024-12-22 09:57:34