Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (M_D), 1,430 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Setting a Key to alter camera mode. #200177
04/02/08 21:47
04/02/08 21:47
Joined: Feb 2008
Posts: 22
J
jsaechao Offline OP
Newbie
jsaechao  Offline OP
Newbie
J

Joined: Feb 2008
Posts: 22
I want to have by default the mouse on mode 2 which would make the mouse free and not alter the movement at all, that way i may use the mouse for button's and menu's however when the player presses and holds the right mouse button the camera mode shifts to 0 which would make the mouse movements change the camera angle and also turn the character. Heres the code i made

if (Key_Pressed(281) == on) {var mouse_mode = 0}
else {var mouse_mode = 2}

it keeps giving me script errors such as "Bad Keyword" or "Script end"

I don't know what i'm doing wrong.

Last edited by jsaechao; 04/02/08 21:51.
Re: Setting a Key to alter camera mode. [Re: jsaechao] #200224
04/03/08 03:48
04/03/08 03:48
Joined: Sep 2003
Posts: 733
Whitefish, Montana
JazzDude Offline
User
JazzDude  Offline
User

Joined: Sep 2003
Posts: 733
Whitefish, Montana
You need some semi-colons. That might help.

function change_mouse_mode()
{
if (Key_Pressed(281) == on)
{
var mouse_mode = 0;
}
else
{
var mouse_mode = 2;
}
}

Re: Setting a Key to alter camera mode. [Re: JazzDude] #200396
04/03/08 20:14
04/03/08 20:14
Joined: Feb 2008
Posts: 22
J
jsaechao Offline OP
Newbie
jsaechao  Offline OP
Newbie
J

Joined: Feb 2008
Posts: 22
it's now giving me a syntax error saying that there is no function for change_mouse_mode()

Re: Setting a Key to alter camera mode. [Re: jsaechao] #200399
04/03/08 20:55
04/03/08 20:55
Joined: Sep 2007
Posts: 67
Seevetal, Germany
Rasterbar Offline
Junior Member
Rasterbar  Offline
Junior Member

Joined: Sep 2007
Posts: 67
Seevetal, Germany
change var mouse_mode to mouse_mode
with var you declare a variable mouse_mode


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