hmann128's Recent Forum Activity

  • hmann128

    There are a few ways to do it. The simplest is to make the objects global so they won't be destroyed when the layout changes.

    Another idea is to store the object's info in an array, then looping over the array to re-create from that. Here's one possible example:

    This may be an overkill for what you want, but the idea is there.

    Hey R0j0,

    what route would you recommend in this scenario:

    The player draws a route and this route is shown on the next layout in which the player must navigate the layout. Once the player has completed this layout the game finishes. The game then restarts and allow the player to draw a new route. Idk if that makes sense but im guessing making the objects global may not be able to apply to what I am trying to do?

  • dl.dropboxusercontent.com/u/5426011/examples33/draw_line.capx

    Thank you so much for that!!! So I have now created it as an object, which is a boundary but now it is coding it to remember the position, so it remains on the next layout. Any clue on this or some sort of basic tutorial in which I can learn it?

    thanks,

    harraj

  • Make a circle Sprite whose diameter is the same as the width. Then just create one of those at the mouse while the mouse button is down.

    I have tried creating a circle, by basically using the paint brush and drawing a dot then resizing it to the dot size, but still the same problem. Is there another way to create an actual circle as the sprite is still a square if that makes sense??

  • Oh, right. I forgot to add these two actions to the second event:

    --- set oldx to mouse.x

    --- set oldy to mouse.y

    That should fix it.

    Thanks again for this.

    See I am running in to the same problem i had before in that it is not a smooth, but jagged and gapped.

    I have attached here what I mean:

    Thanks,

    Harraj

  • You can do it with a sprite that has it's origin at the left-center. It's height is the thickness and if you make it global it will survive till the next layout. The events to draw it is below. You can also create a circle sprite at the mouse to make the line look better at angles. You then can make the created objects solid or something.

    global number oldx=0

    global number oldy=0

    on left click

    --- set oldx to mouse.x

    --- set oldy to mouse.y

    left mouse is down

    --- create sprite at (mouse.x, mouse.y)

    --- sprite: set angle toward (oldx,oldy)

    --- sprite: set width to distace(self.x,self.y,oldx,oldy)

    Thanks for the response R0j0. see i had something like this before and the problem I get from it is that it is not a straight line it looks like this:

    Like its attached to an origin

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The concept I am trying to achieve, is to allow the user to draw lines such as if you were drawing in paint and then make these lines an object which is added to a new layout where the player must navigate around this obstacle. What is the best way to create drawing lines that are smooth and effortless, and how would this drawing be transferred into the second layout?

    Thanks guys

  • I have tried Ejecta along with XCode and managed to get it all working with IAds, however unfortunately IAds have been terminated by apple as they are rejecting new apps with the ad framework!

    What other compilers can I use?? CocoonJS gave me tons of compiling errors and I haven't used any others. What recommendations do you guys have?

    Really appreciate any help as I have been spending countless hours trying to fix this once I receieved the bad news about IAds as soon as I had finally published my App on the app store!

  • Nvm figured it out used the created instance. Please Delete this thread

  • So I have a sprite and I am spawning it constantly and now I have added another frame so another version of this sprite can sometimes appear. However all that is happening is the sprite is spawned and is switching constantly between animations and this happens to all other sprites spawned. How do I make it so the sprite that is spawned is a random sprite and will not change, and the next sprite spawned is a random frame?

    I have tried using (choose (n)) and set animation speed (0) but have had no luck... Please help

hmann128's avatar

hmann128

Member since 8 Jan, 2016

None one is following hmann128 yet!

Trophy Case

  • 8-Year Club
  • Email Verified

Progress

9/44
How to earn trophies