Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (TipmyPip, AndrewAMD, NewbieZorro), 15,207 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: joystick stubborn [Re: Error014] #406431
08/19/12 22:25
08/19/12 22:25
Joined: Sep 2003
Posts: 733
Whitefish, Montana
JazzDude Offline OP
User
JazzDude  Offline OP
User

Joined: Sep 2003
Posts: 733
Whitefish, Montana
That post will get you points for the most sensitive function name.

Re: joystick stubborn [Re: JazzDude] #406432
08/19/12 22:33
08/19/12 22:33
Joined: Sep 2003
Posts: 733
Whitefish, Montana
JazzDude Offline OP
User
JazzDude  Offline OP
User

Joined: Sep 2003
Posts: 733
Whitefish, Montana
Works perfectly

O appears

Fire button changes it to 1

But no bullets

I changed it to mouse_left and 280 and it worked for the mouse and I also got bullets.

So it's not the joystick that's cranky. It's the bullets. LOL

Re: joystick stubborn [Re: JazzDude] #406433
08/19/12 22:56
08/19/12 22:56
Joined: Sep 2003
Posts: 733
Whitefish, Montana
JazzDude Offline OP
User
JazzDude  Offline OP
User

Joined: Sep 2003
Posts: 733
Whitefish, Montana
I found the problem. I added this code to allow the bofors gun to pan and tilt smoothly with the camera when firing. I don't know yet why but at least I know where.

Code:
while (mouse_left == off)
		{
		vec_set (weapon_offset.x, vector (120, 5, -35));
		vec_rotate (weapon_offset.x, vector (camera.pan, camera.tilt,0)); 
		vec_add (weapon_offset.x, camera.x);
		vec_set (my.x, weapon_offset.x);
		my.pan -= 8 * mouse_force.x * time_step;   
		my.tilt += 8 * mouse_force.y * time_step;
		my.tilt = clamp(my.tilt, -25, 85);
		wait (1);
		}
		while (joy_1 == off)
		{
		vec_set (weapon_offset.x, vector (120, 5, -35));
		vec_rotate (weapon_offset.x, vector (camera.pan, camera.tilt,0)); 
		vec_add (weapon_offset.x, camera.x);
		vec_set (my.x, weapon_offset.x);
		my.pan -= 2 * joy_force.x * time_step;   
		my.tilt += 2 * joy_force.y * time_step;
		my.tilt = clamp(my.tilt, -25, 85);
		wait (1);
		}



Re: joystick stubborn [Re: JazzDude] #406434
08/19/12 23:04
08/19/12 23:04
Joined: Sep 2003
Posts: 733
Whitefish, Montana
JazzDude Offline OP
User
JazzDude  Offline OP
User

Joined: Sep 2003
Posts: 733
Whitefish, Montana
Okay...thanks for all the help. All's well. I changed some "whiles" to "ifs" and that solved the problem.

Page 2 of 2 1 2

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

Gamestudio download | 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