Surrounded objects create objects

For questions about using Classic.

Post » Wed Dec 08, 2010 6:19 am

I'm trying to create some objects based on whether there are objects around them. In this case it's floating islands that grow downward based on how wide they are. Creating the surface layer works just fine, but I can't seem to get anything below it to spawn. I've tried (hopefully) checking whether the objects exist around them, extending out the sprite with transparency... nothing seems to work. Also, it's been awhile since I've used Construct so it might be something simple that I'm just not seeing.
B
2
G
3
Posts: 19
Reputation: 888

Post » Wed Dec 08, 2010 7:04 am

Is this top down, or side view, 2d or 3d?
Not sure how that would translate to sideview....
In any case might want to check out the expression distance(x1,y1,x2,y2), or overlapping at offset.
Image Image
B
161
S
48
G
89
Posts: 7,347
Reputation: 66,249

Post » Wed Dec 08, 2010 7:47 am

Side view. Perhaps if I explain more it'll make more sense...

The idea is basically to have a world that the user makes. All they get to begin with is a little patch of land.


As they move around and interact with the world it begins to take shape around them. Say they walk a couple island distances away... I'd like that to become one big island instead of a bunch of little ones.


The problem I'm having is getting anything below the top layer of island to spawn. (The blue area) Right now I'm just working with boxes... Here is the cap I've been working with.
[url:ce37pivd]http://www.mediafire.com/?pm1biulvzlpoy41[/url:ce37pivd]
B
2
G
3
Posts: 19
Reputation: 888

Post » Wed Dec 08, 2010 11:57 am

Well probably the easiest way I can think of would be to use a distort map, but that would mean breaking collision detection, unless you use a canvas.
Thing is your getting an error from your current method, possibly something to do with "is falling" in conjunction with "system create object relative to object", so your probably going to have to figure a different set of events for that.

As for using a distort map the easiest method might be to set the x,y of a vertex a certain distance from the center when you either A: have so many top objects, or B: use the distance of the player from a certain point to control it.
Image Image
B
161
S
48
G
89
Posts: 7,347
Reputation: 66,249

Post » Sat Dec 11, 2010 5:00 am

I found a solution to my problem. Turning the dirt into a platform object and checking if there was walls on both sides did the trick, though the "is falling" condition as you suspected did some funny things once I got it going.
B
2
G
3
Posts: 19
Reputation: 888


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests