R0J0hound's Forum Posts

  • Prominent

    That's not implimented. It proved to be rather complicated the times I looked into it before, and I've been avoiding any plugin modification at this time. So for now only individual objects can be pasted.

  • I don't think you can from the property bar. You'll probably need to do it from events.

  • If it helps this will be hard in any other software as well, unless they handle it specifically.

    Anyways no pathfinding needs to be done at all, unless you need the cars to have a specific destination, otherwise they can just meander.

    Here's one idea:

    https://www.dropbox.com/s/dl5b7om2qwweo ... .capx?dl=1

    /examples34/road_path.capx

    Basically it's a bunch of waypoints connected to make paths. The waypoints can have multiple outgoing paths, so the cars just pick a random one. I made an in game editor so creating the connections is easier. I then can copy the result to a variable and remove the editor if i want to.

    Next step is to make the cars move. I suppose the moveto behavior could have been useful, but I opted to just use events to move from one waypoint to the other. Pretty much the only requirement I had was to specify when to move.

    The car to car awareness proved slightly complicated. It was simple enough to make the car's angle face the direction it was going. Then i could see if another car was ahead with the overlapping at offset condition. That isn't enough for intersections, which would bind up with just that rule. My solution was to only let one car travel through the intersection at one time. It's random so maybe actually making traffic laws would help.

    Overall it works pretty well, however the logic for intersections fails in a few places near intersections, so that would need more work.

    There may be other simpler ways. Standby for a sightly different idea.

  • Use the browser object with the execjs expression. Say you have that json in a text variable called json.

    You could get it with the expression:

    Browser.execjs(json & ".result")

    That should be enough I'd think. If not then then another idea is to convert the Boolean to a number.

    Do that by changing ".result" to ".result?1:0"

  • This topic may help:

  • I don't think I have an example, but the main feature to use is the paste action. The paste action will draw another object onto itself where the objects overlap.

    So basically place a paster object on the layout.

    Change it's hotspot to centered in the properties panel.

    Position it over the triangle so that no matter which angle it faces the paster will still cover the arrow completely.

    Remember the height of the paster. For this example let's say it's 200.

    In events do this:

    Every tick

    --- paster: clear to (0,0,0,0)

    --- paster: set height to 200

    --- Sprite: set visible

    --- paster: paste Sprite

    --- paster: set invisible

    --- paster: set height to 200/2

    And that's about it. I hid the triangle Sprite after drawing it to the paster since we don't want it to draw again.

  • Hey I worked on it a bit more but didn't post the results before I left the house.

    My equation was a tad off. Ex 0.5*sin(angle)^2 needs to be (0.5*sin(angle)^2.

    Other than that the sprite's angle needs to be corrected to eliminate the bounce.

    Set angle to angle(0,0,cos(ang),0.5*sin(ang))

    The only caveat is the Sprite won't be pointing at the mouse anymore. I was working on the math to just find the intersection between the ellipse and the line to the mouse but I didn't finish.

    If you want indavidual X y scaling of layers just use the paster object. It doesn't need webgl.

  • Hmm... You're right.

    If you just set the width to 200*sqrt(0.5*sin(Self.Angle)^2+cos(self.angle)^2) and leave the height alone it works.

    200*cos(self.angle) is the horizontal

    0.5*200*sin(self.angle) is half the vertical

    That makes a right triangle and the last side is what we want the width to be. We can then find it with the Pythagorean theorem:

    a^2+b^2=c^2

  • You have to use the paster object to do skew

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • An ellipse orbit could look like this:

    X= 100*cos(t)+centerx

    Y= 50*sin(t)+centery

    And actually scaling with angle would be similar

    Width=32*abs(cos(angle))+32

    Height=16*abs(sin(angle))+16

    Edit:

    Looking at your picture it may need to be drawn skewed as just setting the width/height may not cut it.

    You could use the paster object for that. 1st paste everything to the paster in a normal circle, then set the paster height to half.

  • The particle object is a good start.

    Changing it's texture to a cloudy shape would help with the misty look.

    It also looks to have motion blur so you may be able use a directional blur effect to achieve that.

    Another idea could to have a texture that looks like part of the stream of water. Then to give it some rotation use sprites with the bullet behavior instead of particles.

  • Ocam works for me on windows vista. There were others that worked when i tried previously, like obs.

  • totoyan

    The goal is always to first create the effect, and this serves are a good example. Sure you can modify it to reuse the same 100 objects or only running the events when you need to, but that wasn't relevant to the example.

  • Prominent

    Sorry, I haven't had a chance to look into it yet. It's probably one of many edge cases I haven't handled.

    Badmiracle

    When using the apply impulse action the first vector is the impulse and the the second is the offset from the center of mass. Leave the second one to 0,0 and it souldn't add rotation.

    X3M

    Those expressions only give values under the pre/post collide triggers or under the "for each collision pair" condition.

  • I hear good things about the "move to" behavior.