Surrounded objects create objects

This forum is currently in read-only mode.
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • 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.

  • 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.

  • 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.

    <img src="http://img.photobucket.com/albums/v286/sakiruyonaki/Island.png">

    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.

    <img src="http://img.photobucket.com/albums/v286/sakiruyonaki/BigIsland.png">

    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.

    http://www.mediafire.com/?pm1biulvzlpoy41

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)