R0J0hound's Forum Posts

  • It's probably happening because the plugin expects the points to be placed in a certain direction (cw or ccw). The fix would involve detecting the direction and re-ordering the points.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yeah. So if your polygon is like this:

    1----2
    |    |
    |    |
    |    |
    |    3----4
    |         |
    |         |
    6---------5[/code:3r7n7a4h]
    
    drag the points around so it's like this:
    [code:3r7n7a4h]1----6
    |    |
    |    |
    |    |
    |    5----4
    |         |
    |         |
    2---------3[/code:3r7n7a4h]
  • Changing the collision polygon so the points are ordered opposite what they are now seems to fix it. I'm backlogged on plugin fixes, and I've been avoiding them, so no eta on a proper fix.

  • Bodhran

    All the effect does is distort the image or sprite to be on a 3d plane. Positioning stuff like walls requires math matching the distort or using the plugin by rexrainbow. To do something like keyo is doing, you'll have to use separate objects with different mode7 settings. There's a capx with the math earlier in this topic, but i still recommend the plugin.

    What I mean by collisions is to design the objects and walls in top view so they move around as wanted. Then you take those positions and map them to the distort as explained above. It's probably a bit tedious to do though.

  • I guess you could take the x and y position of the bottom of the sprite and convert it to a tile x and y with the tilemap expressions. Then you could check one tile below that and see what tile it is.

  • Itenimum1

    The uid tells what other object to connect to. I could have used an object type instead, but using a uid instead makes stuff like connecting to other instances simpler. As an example if you want to add a joint to Sprite1 to connect to Sprite2 you would use Sprite2.uid.

    For the xy's they define where on the objects the joint is connected.

    "rect" and "polar" are offsets from the object, but it's also relative to the object's angle. So for example if you used "rect" with x=32, y=0 and the object had a angle of 90 then the object would be connected 32 pixels below the object's center.

    "imagepoint" should be self explanatory.

    "layout" is a layout position, which in turn is used to calculate an offset. It's probably simpler to wrap one's head around than "rect" and "polar", since it's not relative to angle.

    Depending on the joint there usually are two anchor points, one for each object. The only exception would be "add anchor joint at XY", but since ever field has a description so it should be understandable.

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