R0J0hound's Forum Posts

  • Do you have a particular order you'd like the blocks to be added or removed?

    One brute force way would be to add all the square in the editor and give them an instance variable that you set to the value. Then

    Global number health= 100

    Every tick

    --- square: make invisible

    Square: var <= health

    --- square: make visible

    You could also place all the blocks with events.

    For "x" from 0 to 9

    For "y" from 0 to 4

    --- create square at ( 100+16*loopindex("x"), 150+16*loopindex("y") )

    --- square: set var to loopindex("y")*10+loopindex("x")+1

    Where 16 is the size of the squares and 100 and 150 are the top left corner coordinates.

    The way you set "var" controls the order they appear. Above it adds then a row at a time.

    To make it ordered like your pic you could try this to set var.

    For each square ordered by 1000*(X+y)+y descending

    --- set var to loopindex

  • For more realism a rudder would not affect the angle of the ship, instead it only controls how fast it can turn.

    Either way, instead of using the angle of an object, add the signed angle difference to a variable and use that.

    A signed angle difference is like the anglediff() expression except it's negative when counter-clockwise.

    Using that you can limit the turn of the wheel to something like 3 rotations either direction. Also it makes it simpler to make the ship turn with a ratio of the wheel.

    https://dl.dropboxusercontent.com/u/542 ... ntrol.capx

  • Here's a capx:

    https://dl.dropboxusercontent.com/u/542 ... _jump.capx

    To find the height of the wall you can use a loop with either "overlaps at offset" or looking at the tile itself with "tile at".

    To calculate the jumpstrength use this formula:

    jumpstrength = sqrt(2*gravity*height)

  • I'm using a Toshiba Satellite A215 that was made in 2007

    1.7 ghz AMD Turion x2 dual core

    4 Gb memory

    Radeon x1200 integrated graphics (shares system memory).

    In the past I've also used an old Dell Inspion before it fell apart. It was probably made in 2003 or something. It actually ran C2 ok, but I'd run out of vram at times.

    1.5 ghz Celron processor. Single core.

    1 - 2 Gb of memory. I can't remember which.

    Integrated Intel graphics. Shared memory.

  • With what we have access to I don't think we can know when a process is done with a file. The simplest solution would be to access the file after a set amount of time. Just be sure the program can finish before the c2 export accesses the file.

    The same idea could be applied to the clipboard idea.

  • The only problem is passing values to the exe or getting values back. You could use the clipboard for this but that's a bit hacky. Another option is using a file to return the data, but it's not ideal.

    Outside of that there appears to be plugin for nw.js to communicate with other dlls or you could make a plugin. The problem is, to do either you need to re-compile the nw executable, and unless you're very familiar with the process, it won't be easy.

    Would it be possible to make the program with js instead? That is if you made it. That way it's very doable to make a c2 addon that communicates with it.

  • Giganten

    The chipmunk physics library doesn't support that. If you want it for something like bullets then ray casting might work for you.

  • A search for "steering wheel" has a few examples.

    For example event #6 of this example does it:

  • Eh, a making a tool is proving to be more trouble than it's worth.

    A search for this bug has every time been closed as a problem with a third party addon:

    These two topics found solutions:

    Just remove the plugins in

    %appdata%\Construct2\plugins

    like zenox98 suggests to see if one of those plugins were causing it. If that doesn't work, also remove the third party plugins/behaviors from you C2 install folder. You can always re-install the plugins afterwards and hopefully the authors have fixed it, if not request a fix in their topics.

    Also now that I think about it changing the id's in edittime.js yourself isn't ideal because it will break projects that use that plugin.

  • He means to remove all the third party addons at least temporarily. C2 should run without the error at that point.

    Something you could try is remove different third party addons by trial and error until the error goes away. At that point you'll have narrowed down which plugin is causing the error.

    To fix it look in that plugin's edittime.js and look for lines that start with:

    AddExpression( ...

    The first number after that is an id, if any of those lines have the same Id one needs to be changed.

    Anyway that's all a bit tedious. Tomorrow I'll see if I can make something up to scan all your plugins and just tell you which is broke.

  • Ah, so I was wrong about the type of right angle.

    so the ball only ever goes 0, 90, 180 or 270 degrees?

    You can just brute force it and make an event for each case. Here's one example:

    Ball on collision with circle

    Ball.angle = 0

    Ball.y < circle.y

    --- ball set angle to 270

    Just make seven more like that for every posibility. It could then be simplified using sub-events and else's.

  • Glad it works for you.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This is usually caused when making plugins, every plugin needs a unique id for each of it's ace's in edittime.js.

    Have you made/modified any plugins? Installed any plugins lately?

  • The browser object has that condition. Also I think the wall clock idea is better than letting the game run in the background. If you get the DateTime plugin you can extend the idea to getting money when the game is closed.

    Anyways here's a simple example of an idle game:

    Global number money=0

    Global number moneyPerSec=10

    Global number suspendTime=0

    Every 1.0 seconds

    --- add moneyPerSec to money

    On suspend

    --- set suspendTime to wallClockTime

    On resume

    --- add (wallClockTime-suspendTime)*moneyPerSec to money

  • It's under "system" when adding a condition. The two relevant ones are:

    "Compare" and "pick by comparison". The first one doesn't do any object picking.