Powered by Invision Power Board

 
    Reply to this topicStart new topicStart Poll

> Game Maker Help, I need help making a game.
Unspecified
Uber Bob
  Posted: Apr 21 2007, 11:54 AM
Quote Post


Standard Member


Group Icon
Group: Members
Posts: 22
Member No.: 3361
Joined: 24-February 07

Status: (0d) [--]


I have an idea for a game, which deals with the mouse. However, I don't know how to make the mouse affect the game. Does anyone know how to make the mouse into an object? It is the only problem I have encountered so far, and all I need to finish the game. biggrin.gif
PMEmail Poster
Top
United States
Ziso
Posted: Apr 21 2007, 11:55 AM
Quote Post


Should I be concerned?
[*]

Group Icon
Group: Members
Posts: 992
Member No.: 3387
Joined: 2-March 07

Status: (0d) [--]


Help section.


--------------------
PMEmail PosterUsers WebsiteAOLMSN
Top
Unspecified
Uber Bob
Posted: Apr 21 2007, 11:58 AM
Quote Post


Standard Member


Group Icon
Group: Members
Posts: 22
Member No.: 3361
Joined: 24-February 07

Status: (0d) [--]


Oh, sorry. Didn't notice that section. Can I get this moved somehow?
PMEmail Poster
Top
Canada
Demonlemon
Posted: Apr 21 2007, 12:01 PM
Quote Post


MY CHILDREN COMETH
[*][*][*][*]

Group Icon
Group: Members
Posts: 5647
Member No.: 3281
Joined: 9-February 07

Status: (0d) [--]


yes just Pm a mod.


--------------------
If life gives you lemons... RUN FOR YOUR LIFE!!!
user posted image
TCOTL Reference Humanoid reference Drawings/sprites people have made me.user posted image
PMEmail PosterUsers WebsiteAOL
Top
Belgium
flipiberke
Posted: Apr 21 2007, 12:03 PM
Quote Post


Filiberke+Flip=Flipiberke!
[*][*][*]

Group Icon
Group: Members
Posts: 700
Member No.: 2132
Joined: 28-May 06

Status: (0d) [--]


Use mouse_x and mouse_y to get the mouse position


--------------------
New Super Mario Kart: Nominated for the MFGG awards for game with highest replay value.
user posted image
PMEmail PosterMSN
Top
Unspecified
Uber Bob
Posted: Apr 21 2007, 12:12 PM
Quote Post


Standard Member


Group Icon
Group: Members
Posts: 22
Member No.: 3361
Joined: 24-February 07

Status: (0d) [--]


It says fatal error.

I put "exucute a piece of code" in as an action, and in it I wrote:

mouse_x
mouse_y

and it says:

COMPILATION ERROR in code action
Error in code at line 2:

mouse_y

at position 2: Assignment operator expected.

What do I do now?
PMEmail Poster
Top
Unspecified
zzo38
Posted: Apr 21 2007, 02:58 PM
Quote Post


Registered user


Group Icon
Group: Members
Posts: 1621
Member No.: 2549
Joined: 21-August 06

Status: (0d) [--]


mouse_x and mouse_y are variables, not commands. Wherever you would enter the position of something (for example, jump to position, move toward position, create object at position, destroy objects at position, where to draw something, etc.) enter mouse_x and mouse_y instead of the actual numbers.


--------------------
Access my web-site
Vonkeror: the new web-browser
Wikipedia user-page
My gopher site Forget Web 2.0. Now is the time for Gopher 2.0.
Furryscript!!

Member of Anti-Master-Balls

Message to the moderator: I don't want you to add the badges under my name anymore.
PMUsers Website
Top
Unspecified
Uber Bob
Posted: Apr 21 2007, 04:32 PM
Quote Post


Standard Member


Group Icon
Group: Members
Posts: 22
Member No.: 3361
Joined: 24-February 07

Status: (0d) [--]


...I have no idea what you just said...
PMEmail Poster
Top
Uruguay
EDGE
Posted: Apr 21 2007, 04:37 PM
Quote Post


I'll be back...
[*][*]

Group Icon
Group: Members
Posts: 2775
Member No.: 2518
Joined: 18-August 06

Status: (0d) [--]


...dont know if this is right but I'm trying to explain what he means so it doesnt really matter xD
to create something you put this code instance_create(x,y,object) what he means is that
mouse_x and mouse_y is not a function, is just am x and y point so if you want something to be created in the cursor put this instance_create(x.mouse_x,y.mouse_y,object)...or something like that, get it? mouse_x and mouse_y its just a point not a function.


--------------------
"You've been playing Super Mario Sunshine. haven't you?"
~The Yoshi Army~Team 1-Up~MFGG Submissions~Ref~
PMEmail PosterMSN
Top
Finland
Ultramario
Posted: Apr 21 2007, 04:45 PM
Quote Post


Dan Dan Dan!
[*][*][*][*][*]


Group Icon
Group: Members
Posts: 11240
Member No.: 2164
Joined: 9-June 06

Status: (0d) [--]


Use "Perform a step event towards a point" and fill in as following:
CODE

x         = mouse_x
y         = mouse_y
speed  = put a high value here (20 for example)
spot at = solid only


And zzo38, mouse_x and mouse_y are values of variables.

This post has been edited by Ultramario on Apr 21 2007, 04:46 PM


--------------------
PMEmail PosterUsers WebsiteAOL
Top
Unspecified
Uber Bob
Posted: Apr 21 2007, 06:07 PM
Quote Post


Standard Member


Group Icon
Group: Members
Posts: 22
Member No.: 3361
Joined: 24-February 07

Status: (0d) [--]


All of you guys, thanks for the help, but I figured it out.
PMEmail Poster
Top
Unspecified
zzo38
Posted: Apr 22 2007, 02:29 PM
Quote Post


Registered user


Group Icon
Group: Members
Posts: 1621
Member No.: 2549
Joined: 21-August 06

Status: (0d) [--]


QUOTE (Ultramario @ Apr 21 2007, 02:45 PM)

And zzo38, mouse_x and mouse_y are values of variables.

mouse_x and mouse_y are names of variables. Just like any other variables their names can be used in place of a number


--------------------
Access my web-site
Vonkeror: the new web-browser
Wikipedia user-page
My gopher site Forget Web 2.0. Now is the time for Gopher 2.0.
Furryscript!!

Member of Anti-Master-Balls

Message to the moderator: I don't want you to add the badges under my name anymore.
PMUsers Website
Top
Finland
Ultramario
Posted: Apr 22 2007, 02:43 PM
Quote Post


Dan Dan Dan!
[*][*][*][*][*]


Group Icon
Group: Members
Posts: 11240
Member No.: 2164
Joined: 9-June 06

Status: (0d) [--]


In Game Maker 6 they are values, not variables.

I tested it by setting variable mouse_x to 16 and I got an error message about it while running the game.


--------------------
PMEmail PosterUsers WebsiteAOL
Top
United States
Grant
Posted: Apr 22 2007, 03:15 PM
Quote Post


John Freeman said
[*][*][*][*][*]
[*][*][*]

Group Icon
Group: Members
Posts: 8260
Member No.: 2900
Joined: 31-October 06

Status: (0d) [--]


Just to clear this up, I believe the documentation of GM calls mouse_x and mouse_y "read-only variables", since they can only be read, and not set in code.

It says in the documentation that "Variable names marked with a * are read-only, that is, their value cannot be changed". mouse_x and mouse_y are mentioned in a list of "variables and functions" for mouse interaction, with a * next to them.

I'm not trying to be a know-it-all or anything; just saying.


--------------------
user posted image

QUOTE (oh youtube trolls)
u guys r retarded hippocrates

QUOTE (Piemanthe3rd)
Pie is not random. I wish people would realize this.
PMEmail PosterUsers WebsiteAOLMSN
Top
United States
Ianprime0509
  Posted: Apr 22 2007, 04:47 PM
Quote Post


My favorite E3 game so far
[*][*]

Group Icon
Group: Members
Posts: 488
Member No.: 3316
Joined: 17-February 07

Status: (0d) [--]


In your code, just say
CODE

x = mouse_x
y = mouse_y

smile.gif


--------------------

user posted imageuser posted imageuser posted image
Signature version 3.0
PMEmail Poster
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

  Topic Options Topic Options Reply to this topicStart new topicStart Poll

 




[ Script Execution time: 0.0689 ]   [ 14 queries used ]   [ GZIP Enabled ]   [ Server Load: 1.17 ]