The Daily Click ::. Forums ::. Klik Coding Help ::. SIM CITY CLONES
 

Post Reply  Post Oekaki 
 

Posted By Message

martyn woodward



Registered
  01/07/2003
Points
  3
30th June, 2005 at 07:17:39 -

Im making a small sim city type game, so far I have the basic city building in isometric done, and the scrolling etc. Now I need to be able to place buildings down either in front of or behind other buildings automatically when placed,(play any city building game and you`ll know what i mean.) Anybody got any ideas how to start??

Yours hopefully

Martyn

 
mw

Ski

TDC is my stress ball

Registered
  13/03/2005
Points
  10130

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!KlikCast HelperVIP MemberWii OwnerStrawberryPicture Me This Round 28 Winner!PS3 OwnerI am an April Fool
Candy Cane
30th June, 2005 at 07:20:51 -

its hard ive tried before, firstly its gonna be hard if all ur isometric buildings take up different floor-spaces, i made all my buildings to the same size and just made em look totally different. For front or behind you could use detectors? when it collides with detector a it goes to back when it collides with b it comes to front? ahhhh i dunno im probably very wrong lol. goodluck.

 
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
30th June, 2005 at 07:35:10 -

There is an excellent extension that will automatically order your active objects by their Y Axis. It's called the Layer Object and can be found here:
http://www.clickteam.info/extensions/extview.php?id=129
The action you want is something like "Order objects by their Y value"

Enjoy.

 
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

Cazra

Crazy?

Registered
  24/07/2002
Points
  4472

Game of the Week WinnerVIP Member
30th June, 2005 at 07:44:04 -

No extensions:

>Always
-start loop "front/back" for (height of playfield) # of loops
>on loop "front/back"
+>if Y position of building1 = loop index of "front/back"
-send building1 to the front
//repeat for all other buildings


 
n/a

martyn woodward



Registered
  01/07/2003
Points
  3
30th June, 2005 at 10:08:52 -

thanks! trying the layer obhect first, cant quite get it to do what i want tho.

 
mw

martyn woodward



Registered
  01/07/2003
Points
  3
30th June, 2005 at 10:16:26 -

when getting layer information from an object for the move below command, the expression :

lyrGetLevel( "Active 2", > Enter value here < )

comes. what do i put here???

 
mw

-Vinny-



Registered
  12/01/2005
Points
  436
30th June, 2005 at 11:46:30 -

that's a pretty neat trick snerlin, i'm gonna try it now

 
Vinny

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
30th June, 2005 at 11:48:21 -

If he is using TGF, fastloop is an extension. But one he should have got by now.

 
.

-Vinny-



Registered
  12/01/2005
Points
  436
30th June, 2005 at 11:50:12 -

i can't edit my post for some reason or another, but i wanted to ask if you could replace building1 with a group, would that work? because that would save a lot of event lines

 
Vinny

Cazra

Crazy?

Registered
  24/07/2002
Points
  4472

Game of the Week WinnerVIP Member
30th June, 2005 at 12:00:15 -

nope, groups won't work. They can't retrieve X,Y positions.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click