adding segments in runtime

0 favourites
  • 8 posts
  • hey everyone, hope you all had a good weekend.

    well ive spent most of mine working on my game and as usual come across another snag. lol.

    -use space to spawn a new cube

    -left mouse t draw and drag out conveyor belts

    there is the basic engine so you guys and girls can check it out.

    ok so so far you can drag out conveyor belts which can move the cubes around the screen. but as you can see the conveyors are just black lines, and tbf...just ugly lol

    now my problem is if i just make the conveyor a big image, it will simply get stretched and again...look ugly.

    what i hope to do is make it so when a user drags out a line, the starting point and end point will become "caps" which will be cartoon looking ends of a conveyor belt,

    once done, the game will calculate the length of the line made and fill in the space between the caps with conveyor belt segments.

    (for example; for every 20 pixels of the lines length, add 1 segment ect)

    so this way the overall belt will look decent and overall...not stretch <img src="smileys/smiley4.gif" border="0" align="middle" />

    so what im asking is 1st off is this possible to do in construct?

    secondly how would i even begin at pulling off this mystery lol



  • Make it a family, then compare the width, if the widths over a certain width spawn a sprite or whatever at sprite.x + 20

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • right o, dont i need to be a paid member to use families?

    anyways i like the calculation you provided so ill give it a go

    <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Yeah families is a paid feature..

  • guess i cant do that feature then, any other ways i could do it?

  • just buy it, it is worth it.

  • You could use the tiledbackground object.

  • wow, thought i was screwed there and then i saw this. thankyou, this was just the type of thing i was looking for, ill look into when i get some free time and see how you did it


    oh and spexel, its not that i choose not to buy it, i simply dont have the cash to pay. student life is taking its toll <img src="smileys/smiley6.gif" border="0" align="middle" />

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