answersLogoWhite

0


Best Answer

obj_select(usually just a visual halo or something):

step:

x= -500;

y= -500;

with(all)

{if self.selected = true;

{other.x = x; other.y = y;}}

(note that tabbing and lines do not matter in gml, you could use this if you wanted to:

x= -500; y= -500;with(all) {if self.selected = true;{other.x = x; other.y = y;}}

And also with the selectable object:

Left Pressed(or however you select it):

with(all)

{self.selected = false;}

self.selected = true;

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you make your mouse select a unit in game maker when it clicks on it?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you make it when an object appears when you click anywhere in the room in Game maker?

Select the event 'If Global Mouse Pressed' and in 'execute a piece of code', put instance_create(yourobject, mouse_x, mouse_y) But you should really get on the game maker fourms for this stuff :/


What is the game key of farm ...?

1. Open the email you received after purchasing the game and select the text between the lines "---BEGIN GAME KEY---" and "---END GAME KEY---". To select the text: 1) place your mouse cursor at the top left of the text; 2) press and hold your left mouse button; and 3) drag your mouse cursor to the bottom of the text.


What is the move to mouse click code for Game Maker?

There is no code for that, you'll have to make something else. sorry


What is the game key of farm frenzy 3?

1. Open the email you received after purchasing the game and select the text between the lines "---BEGIN GAME KEY---" and "---END GAME KEY---". To select the text: 1) place your mouse cursor at the top left of the text; 2) press and hold your left mouse button; and 3) drag your mouse cursor to the bottom of the text.


On Game Maker 8 you want a certain kind of bullet to fire when the mouse is pressed and a key is held how do you do this?

ug


How do you make an object stop moving when it touches the mouse in game maker?

if mouse_x y { hspeed = 0; vspeed = 0; }


How do you make an object shoot in game maker?

for shooting towards the mouse, there is an event called "global mouse left" in this event, add an action called "create object moving". select the obj_bullet (by now you should have this object created) X:mouse_x, Y:mouse_y ,speed:30 and your done. add enemies with a collision event to the bullet and add destroy instance:self.


How can you make a point on your object follow your cursour in game maker?

Select the object you want and make a step event. Then under the step event put "jump to position" and for the values put mouse_x and mouse_y. This means every step it will jump to the exact position of the mouse. The steps are equivalent to about a millisecond, so it should move right along with your mouse. Hope this helps.


Who is the game maker?

Sorry, But this area is for game maker questions only, GAME MAKER, As in the PROGRAM GAME MAKER, Not Other Game Makers, Game maker is owned by yoyo games, So please dont post questions about other game makers here, but, to answer your question, game maker is the best game maker, just search yoyogames game maker in Google UK.


What is the perfect game?

The perfect game is a simple game called helicopter. This game involves the player to navigate a small helicopter through a challenging obstacle course by using a series of clicks to guide it. To move up, simply click the mouse and to stop moving up and free fall all you need to do is let the mouse button go. You automatically move forward.


Can you transfer a game from game maker to game maker studio?

yes


What are the combos for paws the game?

some of them are: Explosion: three left clicks Laser: up-left-right Damage orbs: three right clicks Fire storm: left-up-right Rebirth: three up clicks Cherry blossem: up-right-left Stone Maker: right-right-left thats all the combos i know, i hope these helped you