R0J0hound's Recent Forum Activity

  • I'm not super clear about what you're doing but here's the formula to

    https://www.siggraph.org/education/mate ... 2drota.htm

    then you could do this to rotate the offsets by the angle:

    vec2(tex.x+ cos(radians(angle))*offsetX - sin(radians(angle))*offsetY, tex.y + sin(radians(angle))*offsetX + cos(radians(angle))*offsetY)

  • How many layers, and do you use "force own texture"? But really, seeing the capx instead of screenshots would yield a faster diagnosis.

  • It probably has to do with using the "any" type. The sdk has number type params too that probably works. With "any" I'd assume you'd have to convert it to a number or something.

  • Solomon

    I'm not one of the developers, just an enthusiast.

  • Try Construct 3

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

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

    Only Construct has this because it follows a different pattern to other programming languages. Namely Construct uses object lists that you filter with events, so if you want to pick one particular instance you'll have to filter the list down. Other programming languages only deal with only one instance at a time so you'd end up using lots of loops to compare instances with instances.

    Personally I like using families to pick a different instance of the same type and I wouldn't mind seeing a way to do it in events without the need to setup a family beforehand. In my mind I'd like an overhaul of the event system so it's easier to learn and more powerful, but the exact details of such a proposal will have to wait till I've ironed out all the details, but in such a design I'd make something like this situation more trivial.

  • Not in game, the runtime does different setup for webgl on/off when the runtime starts. Best you could do is two exports, one with webgl of and one with webgl off. Then when you change the option your game would cause the the url of one or the other to load.

  • Ashley

    I refined the capx further here:

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

    Description:

    The bug is an "or event" that's a sub-event of an empty event affects a following "or event" that's a sub-event of a "for each" event.

    Here's what the events looks like:

    The layout has two sprite types: red and blue.

    Red has only one instance and can be anywhere. It is only required to have the "for each".

    Blue has at least two instances to be able to see the bug.

    The gist of the events is to pick the first instance of blue and make it transparent if it's left or above the center of the layout (250,250).

    It acts as intended for the first instance of blue, but when event 2 is enabled then event 4 also seems to pick any other instances of blue. The other instances are only picked with the second condition of event 4 though. So if any other instance has a y lower than 250 it becomes transparent.

    The expected behavior would be for the other instances to not be picked regardless if event 2 was enabled or not.

    If rewritten without using "or", and keeping the same behavior as the bug, the events would look like this:

    This was tested in r219 in google chrome 47.

  • Probably something like this to set column 1 to column 0:

    set array at (1,0) to array.at(0,0)

    set array at (1,1) to array.at(0,1)

    set array at (1,2) to array.at(0,2)

    set array at (1,3) to array.at(0,3)

    set array at (1,4) to array.at(0,4)

    ...

    set array at (1,array.height-1) to array.at(0,array.height-1)

    But that just screams "use a loop", so...

    repeat array.height times

    ---set array at (1,loopindex) to array.at(0,loopindex)

  • Here's a further refined capx:

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

    r219

    Enabling\Disabling the "or event" at event 3 affects the result of the following "or event".

    With the first or event enabled the second or event changed the picked blue from uid 0 to uid 12.

    I'll see if the capx can be reduced further.

  • Without looking at your capx I can guess you're using the system->compare condition with distance() expression to check the range. You can probably fix it by either using the system->"pick by comparison" condition to pick the objects in range or you could loop over the enemies with a "for each" condition.

  • The NWjs runtime is what takes up most of the export. You can look in the NWjs install folder to see the empty size. Next up would be the sound and graphics size. Lastly would be the Javascript, events and layouts but those affect the size much less than anything else. The size of your capx may give a ballpark of the size that would be added to the NWjs runtime size but you'd have to export to see the actual size.

  • Could be an interesting feature. Of course there's nothing stopping you from coming up with your own animation system with events. Here's one I did a while ago using sprites to define keyframes: