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
3 registered members (AndrewAMD, 7th_zorro, TedMar), 1,243 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Entity move to mouse position #7142
10/02/01 16:03
10/02/01 16:03

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



I'm making an rts. How can I get a tank to move to where I click?

Re: Entity move to mouse position #7143
10/10/01 11:42
10/10/01 11:42

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



Make it an EVENT_CLICK, read the mouse_pos on the screen and perform a MOVE_ME on the tank.

Re: Entity move to mouse position #7144
10/10/01 14:44
10/10/01 14:44

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



Dragon..

Isn;t the "mouse.pos" just 2D. Not 3d, so it doesn't relate to any position on the actually 3d world?

EG. - Mouse pos could be 520, 370 x and y respoectively right?

BUT I want the "tank" to move to a position on the map say 530, 200, 70.. x, y and z respively..

I thought there was a command called mouse_to_level.. but I can't find it in the manual.

Anyway... my answer is - "I don't know".
-Static


Re: Entity move to mouse position #7145
10/10/01 15:28
10/10/01 15:28
Joined: May 2001
Posts: 1,261
Outarville, France
al1 Offline
Expert
al1  Offline
Expert

Joined: May 2001
Posts: 1,261
Outarville, France
quote:
Originally posted by Matthew Reid:
I'm making an rts. How can I get a tank to move to where I click?

look at stratego on AUM2
http://www.gameresource.de/aum/aum2/english/aum2/index.html


Re: Entity move to mouse position #7146
10/10/01 18:16
10/10/01 18:16

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



var camera_height = 800; // camera height

temp.X = MOUSE_POS.X;
temp.Y = MOUSE_POS.Y;
temp.Z = camera_height;
vec_for_screen (temp, CAMERA); // temp holds pointer's coords now
MY.SKILL12 = temp.X; // store pointer's coords before they get lost
MY.SKILL13 = temp.Y;

Taken from Stratego

The problem with this is that the 3rd co-ordinate, is taken from the cameras height. Which means the camera has to be facing downwards.. I think..

I just don't see howit can be converted to make a game like say... Sacrifice.

-Static



Moderated by  HeelX, Spirit 

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