R0J0hound's Forum Posts

  • I believe this is the one:

    https://www.scirra.com/manual/22/runtime-overview

  • If you search for "random without repeat" the question has come up before a few times, and I think a plugin has been made to help with this.

    The basic idea is to keep track of the last color of the created object and if the the random color is equal to that make the color be picked again. So like this if you have a separate object per color:

    global text lastColor=""
    global text rndColor=""
    
    +-------------------------------+
    | every 1.0 seconds             |
    +-------------------------------+
    	+---------------------------+
    	| while                     | set rndColor to choose("blue","red","green")
    	+---------------------------+
    		+-----------------------+
    		| lastColor <> rndColor | stop loop
    		+-----------------------+
    	+---------------------------+
    	| rndColor="blue"           | create blueSprite at (0, 0)
    	+---------------------------+
    	+---------------------------+
    	| rndColor="red"            | create redSprite at (0, 0)
    	+---------------------------+
    	+---------------------------+
    	| rndColor="green"          | create greenSprite at (0, 0)
    	+---------------------------+
    	+---------------------------+
    	|                           | set lastColor to rndColor
    	+---------------------------+[/code:1yta3k2o]
  • Basically the logic would be :

    copy array1 to array2

    shuffle array2

    compare array1 to array2

    and if any two values are the same repeat the shuffle

    A partial look of how the loop should look is this:

    +------------------------------------------------+
    | while                                          |
    +------------------------------------------------+
    	local variable again=0
    	+--------------------------------------------+
    	|                                            | shuffle array2
    	+--------------------------------------------+
    	+--------------------------------------------+
    	| array: for each x                          | set again to 1
    	| array: current value=array2.at(array.curX) |
    	+--------------------------------------------+
    	+--------------------------------------------+
    	| again=0                                    | stop loop
    	+--------------------------------------------+[/code:ents26h8]
    You can find ideas of ways to do the shuffling elsewhere on the forum.
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Bodhran

    1.

    Probably sorting by y would be easiest

    for each sprite ordered by sprite.y ascending

    --- sprite: move to front

    2.

    You'll have to this before mapping the position to the mode7 position.

  • The curve has to do with how you're using lerp. Since you have the in and out locations you can change the lerp to basically lerp(in.x, out.x, amount) and just add to/subtract from the amount value to a from 0 and 1. The min/max is basically like clamp but in only one direction.

    global number zoom=0

    global number amount=0

    on any key pressed

    --- set zoom to 1-zoom

    zoom=0

    --- set amount to max(amount-0.5*dt, 0)

    zoom=1

    --- set amount to min(amount+0.5*dt, 1)

    every tick

    --- scroll to (lerp(in.X,out.x,amount), lerp(in.y,out.y,amount))

    --- set layout scale to lerp(1, 0.3, amount)

  • Yeah you could probably use anything global to do this: variables, objects or layers.

  • You can only access objects on the running layout. Objects on other layouts don't exist so you can't access them.

    Maybe you can make the objects global and just hide them most of the time. Or just storing the health in something global.

  • You can set the layout angle with events.

  • There's a sticky post in the completed addons section of the forum that tells how to install them, that's probably useful to look at.

    Basically:

    If the plugin/ behavior has a .c2addon you can drag and drop it into the editor itself.

    Otherwise you need to go to the construct 2 install folder, find the folders of plugins or behaviors and copy the plugin/behavior in depending on what it is.

    The guide explains it better, and maybe you can compare what you've tried to what it says and see what was wrong to make it not work.

  • Uninstall Winamp? I mean if it indeed is causing such an issue to affect other software.

    In general, software won't cause errors in other software. if winamp is using a high amount of cpu then the whole system would have less cpu to use, so c2 would be slower.

    If software does cause issues in other software then it's either abusing system settings or it's virus ridden.

    That's just my thoughts. I don't use Winamp, but since it's to play music, it should not affect other software at all.

  • I don't think newline ever worked with buttons. You can make the text into multiple lines by changing the size of the button though, so maybe that's what you had before.

    The reason you can't put text objects on top of the button is because it's a form control that's not drawn to the canvas. Instead it's above the canvas.

    Technical stuff aside, if you want more control you could make the buttons with sprites instead.

  • I guess you could set the elasticity of both objects to 1.0.

  • What about the answer to your old question?

    If not then the search gives a few other ways:

  • You can do it with the tilemap expressions. First you use the expressions to convert the touch.x and y to the tile column and row. Next you use another one of the expressions to to convert the row and column to the xy of a tile.

  • Did you include the while condition?

    If you did and it still leaves it behind how fast is Sprite going?