The Daily Click ::. Forums ::. Klik Coding Help ::. Rea Time Strategy drawbox
 

Post Reply  Post Oekaki 
 

Posted By Message

Jakob37



Registered
  07/08/2005
Points
  541
15th January, 2006 at 10:02:17 -

I am planning to do a Real Time Strategy game when Iīm finishīd with my current game but I donīt know how to the box you draw to mark units. You know, you press a cordinate with the mouse and then move the mouse and there it appears a box from the cordinate to the mouse as marks all units beneath it, (it is used in almost every RTS strategygame.)
So I wonder, can someone tell me how to do this or point me at an FAQ or something like that.

 
n/a

Jakob37



Registered
  07/08/2005
Points
  541
15th January, 2006 at 10:25:09 -

Hmm, i missed the "L" in the title.

 
n/a

Retainer



Registered
  02/06/2005
Points
  218
15th January, 2006 at 12:22:18 -

Kinda like this:
http://retainer.gardet.org/examples/rts_marking.cca

 
Alien Invasion. Going forward!
http://www.create-games.com/project.asp?id=1092

Klikmaster

Master of all things Klik

Registered
  08/07/2002
Points
  2599

Has Donated, Thank You!You've Been Circy'd!VIP MemberPS3 Owner
15th January, 2006 at 12:22:54 -

Do you have MMF? If so, the active system box is useful for that task.

 
n/a

Jakob37



Registered
  07/08/2005
Points
  541
16th January, 2006 at 09:09:25 -

Klikmaster: I use MMF but how do I use active system box for that?
Retainer Iīll test your file after school.

 
n/a

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
16th January, 2006 at 09:20:51 -

Create 4 Actives, one for each corner.
Always set Active1's position to the point where you first clicked.
Always set Active2's x position to the point you clicked, but set it's y position to the current mouse Y
Always set Active3's y position to the point you clicked, but set it's x position to the current mouse X
Always set Active4's position to the point where your mouse currently is.

You can then add another 4 active systemboxes which are just 2x2 pixels in size, and make them stretch between each of the four corners. People are saying to use Active System boxes, because their image wraps.

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Jakob37



Registered
  07/08/2005
Points
  541
16th January, 2006 at 09:55:12 -

Hmm, I think I get it. But how does I do so the units inside the box being marked? Tell me if I have wrong but isnīt the box just a box with nothing within? You have a box but how does it mark the units?


Image Edited by the Author.

 
n/a

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
16th January, 2006 at 12:31:54 -

X of unit is less than right detector + X of unit is greater than left detector + Y of unit is great than top detector + Y of unit is lower than bottom detector = Unit is selected.

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Jakob37



Registered
  07/08/2005
Points
  541
16th January, 2006 at 14:37:09 -

Ah, that should I have thinkīd about.

 
n/a

Jakob37



Registered
  07/08/2005
Points
  541
16th January, 2006 at 14:47:37 -

Yes now does it work properly.
Enough with stupid questions and thanks for your help.

 
n/a

Klikmaster

Master of all things Klik

Registered
  08/07/2002
Points
  2599

Has Donated, Thank You!You've Been Circy'd!VIP MemberPS3 Owner
16th January, 2006 at 19:05:41 -

Um, Assault Andy, it's an active system BOX, why have 4 of them for lines when you can use them for a box? Just make it transparent with a border. U only need 1 active system box, no actives

 
n/a

Klikmaster

Master of all things Klik

Registered
  08/07/2002
Points
  2599

Has Donated, Thank You!You've Been Circy'd!VIP MemberPS3 Owner
16th January, 2006 at 21:07:31 -

Just like Phizzy said

 
n/a
   

Post Reply



 



Advertisement

Worth A Click