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
4 registered members (AndrewAMD, TipmyPip, NewbieZorro, Grant), 14,196 guests, and 5 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
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 | 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