Gamestudio Links
Zorro Links
Newest Posts
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Akow, SBGuy), 1,423 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19058 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Turn player with mouse without using mouse_force #366971
04/08/11 13:13
04/08/11 13:13
Joined: Nov 2003
Posts: 433
The Netherlands
T
Toon Offline OP
Senior Member
Toon  Offline OP
Senior Member
T

Joined: Nov 2003
Posts: 433
The Netherlands
Hello, does anyone know if it is possible to turn the player (player.pan) with the mouse without using mouse_force.x ?

This is what I allready have but when the cursor is at 0 or screen_size.x the player stops turning. I somehow need to reset the mouse_pos.x and old_mouse_pos_x...

Code:
var speed;
var old_mouse_pos_x;

starter test
{
	while(1)
	{	
		speed = old_mouse_pos_x-mouse_pos.x;
		old_mouse_pos_x = mouse_pos.x;
		mouse_map = NULL;
		mouse_mode = 1;
	
		if(player)
		{
			player.pan += speed * time;
		}
		wait(1);
	}
}



Re: Turn player with mouse without using mouse_force [Re: Toon] #366979
04/08/11 13:57
04/08/11 13:57
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
I'm not sure I understood completely what you want. You want to reset the mousepointer. Does that mean your player moves the move cursor to the left edge of the screen and *poof* it comes out at the right edge so he can continue to turn left?


Always learn from history, to be sure you make the same mistakes again...
Re: Turn player with mouse without using mouse_force [Re: Uhrwerk] #366982
04/08/11 14:10
04/08/11 14:10
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
have a look at mickey.x

Re: Turn player with mouse without using mouse_force [Re: MrGuest] #368233
04/23/11 05:37
04/23/11 05:37
Joined: Nov 2003
Posts: 433
The Netherlands
T
Toon Offline OP
Senior Member
Toon  Offline OP
Senior Member
T

Joined: Nov 2003
Posts: 433
The Netherlands
Thanks smile I used that a couple of times before for scrolling (mickey.z). I did not know there also was a .x and .y ^^ thanks again!


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1