Scripts / Mighty Mouse! (doh!)

Author
Message
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 12th Sep 2019 20:13
Mighty Mouse Throws Cars on Villains- Saves the City!

Or so would read the headline if this script where working.
A> Move 3D object with mouse
B> Click Mouse
C> Object still moves, slides, flies, etc
D> The world is saved!

Any help on this? I think the mouse control as constituted constrains any chance
for it to fully work- unfortunately. Unless I could capture the x,y,z movement
somehow else? Could we get lucky?

Issues--
Either the object will slide, or it will go up and drop-- wonder why not both?
Some reason the controls reverse after the first try, and the mouse wheel ...
the object keeps going up? Again- only after first test.

Testing;
Place a barrel down with the script-- keep trying to throw the object
to see various behaviors.

Attachments

Login to view attachments
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 12th Sep 2019 20:54
Right Mouse does nothing for me.
Mouse Wheel raises and (sometimes) lowers.
Left mouse drops it.

Why not use pickuppables.lua as a base and go from there? It has push/pull/throw built in.
Been there, done that, got all the T-Shirts!
PM
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 12th Sep 2019 23:29
Left Click to fling... slide mouse, fling.

Well, the idea was that you could toss things with "skill" either like bowling,
curling, or even darts. Of course a very smooth, reliable mouse feedback
would be essential for that. And... maybe it's not Nintendo here?
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 13th Sep 2019 13:26
The mouse feedback is limited by the frame rate as the script is called once per frame.

How good are your calculus skills?

Been there, done that, got all the T-Shirts!
PM
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 13th Sep 2019 17:58
First of all, (according to what I've observed), it seems like some more or
better mouse readings and control would help. When I attempt to do:
g_MouseX = 50, it not only does not work, but it seems to reset both mouse X
and mouse Y to zero (maybe like calling the Activate Mouse function) again.

Strange, but also I saw \\ PositionMouse(x,y) -- repositions the hardware mouse pointer in real-time (screen size coords) //

But, that didn't seem to do anything helpful either. I tried a few sets of numbers
including something like halfway between my screen resolutions approx (700, 400).

Here's why getting the mouse in the center (at 50,50) is pretty much essential for this
idea-- if the mouse is at or very close to zero, there is no more movement to the left,
therefore, it's like hitting a wall when you want to keep going more to read the mouse
movement further, --THEN-- at zero reset to 50.... move, repeat, move, repeat.

Inadequate for this it seems is the engine mouse "insides".
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 13th Sep 2019 18:04
g_MouseX and g_MouseY give you the current position of the mouse on screen in % terms (i.e. 0 .. 100).

PositionMouse( 50, 50 ) will stick the mouse in the centre of the screen.
Been there, done that, got all the T-Shirts!
PM

Login to post a reply

Server time is: 2024-12-22 08:46:25
Your offset time is: 2024-12-22 08:46:25