RTS, micro mechanic?

Get help using Construct 2

Post » Fri Jan 20, 2012 8:22 am

Is this possible in Construct2?


I wanted to build some sort of unit control RTS mechanic.

I.E

Click or drag a box around a sprite/image, click somewhere, and have it go there.


I was thinking I would need to utilize variable driven animation and Mouse.X, Mouse.Y.

Perhaps something like,

isSelected
move angle towards mousex,mousey
move ?

but does anyone have an idea they could share with me to make this a lot better or easier?


another idea I had was to implement some sort've grid or tile system.

Using two variables, isSelected for the unit and tileSelected, that way it's less gimicky trying to force the position of where the mouse clicked, as I can't seem to find an event to assign a X/Y of where was clicked.


any help on something grid like as well?

Thanks. :) Khaz2012-01-20 08:25:30
B
11
S
3
G
2
Posts: 110
Reputation: 2,410

Post » Fri Jan 20, 2012 8:25 am

In the how do I FAQ I remember there is a:
Several RTS mechanics (camera movement, selecting units, etc...) - LINK

It might be worth to check out, but the example is quite old now, so maybe stuff in it can be made differently now.

This should still give you a first step in the right direction.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,786

Post » Fri Jan 20, 2012 8:37 am

Thanks! Link digging brought me to TheLure's WalkTo demo which gave me a great concept of how to achieve what I want.

I feel like a reaalll noob, should've checked that FAQ.

Forgive me.
:P
B
11
S
3
G
2
Posts: 110
Reputation: 2,410


Return to How do I....?

Who is online

Users browsing this forum: Radulepy, tarek2, TiagoCesar and 18 guests