R0J0hound's Forum Posts

  • cymrix

    It's a known issue with the canvas plugin. The plugin was originally made using just canvas2d (or no webgl). With webgl enabled every time the object draws, it's image is copied to a texture so it can be drawn, this is what causes the fps drop. The recommended solution is to set webgl to off.

  • That 2nd event is comparing carang1Stolen to choose(1,2,3), you need to set carang1Stolen to choose(1,2,3).

  • Those behaviors are family behaviors. If you select the ball family in the projects bar you can edit the behaviors.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 1. You'd have to test it and see, and then it would also depend on the device. Generally the size of the image doesn't affect speed. Image size does affect memory usage, and keep in mind that mobile devices have less memory than PCs.

    2. You can do that approach. Load the text file with the ajax object and utilize the System text expressions to read parts of the text.

  • It looks fine to me. What is not working, or rather what is happening?

    My only thought is perhaps an animation is causing another collision in a frame or two.

  • I can think of a few ways to do it. One would be to use the array object to store the list.

    Another idea would be to take advantage of object picking so that the picked objects would be the list.

    In a game of say Chess or Monopoly, every game position would be an instance of a sprite.

    Then the grand pseudo event could look like this:

    +Pick a piece

    +pick game_positions that piece can move to

    +not game_positions that already have a piece on them.

  • In C2 0 degrees is to the right. Up would be -90 or 270 degrees. Chane the angle of your sprite and edit the sprite's image so that it's facing the right.

  • Computers cannot represent 0.1 exactly in binary, so a very close approximation a little less than 0.1 is used. That difference increases every time 0.1 is added.

    One solution would be to replace the TimeSpan=0.8 condition with:

    System Compare abs(TimeSpan-0.8) < 0.0001

    Another would be to only add integers to TimeSpan and set the text to TimeSpan/10.

    A final idea would be to instead of adding to TimeSpan every 0.1 sec, add dt to TimeSpan every tick and set the text to int(TimeSpan*10)/10.

  • Just don't look behind you...

    <img src="http://dl.dropbox.com/u/5426011/pics/auntie_val_near_miss.PNG" border="0" />

    I had a friend who had a Oak tree branch land on his house. It cracked his foundation among other damage. Dealing with house damage is the last thing you want to deal with when it's snowing and it's around Christmas time.

  • One way would be to use the Dictionary object and use keys like "3,5,4,4,5,10,100".

    Another idea would be to use a xml file to store all the dialog and access it with the XML object.

  • spongehammer

    The canvas topic has most of the info about the plugin.

    The .ASJSON expression is all the pixel data (red,green,blue,alpha in the range of 0-255) of all the pixels in a format that can be simply loaded into an array object.

    A bit of a discription of it's use:http://www.scirra.com/forum/using-pixel-colors-as-reference-for-level-layouts_topic57020_post355255.html?KW=AsJSON#355255

    xeed

    It's tricky to make the behaviors work with per pixel collisions.

    Here I got it working with the 8direction behavior by moving the object back to it's last collision free location and setting the object speed to 0.

    For the platform behavior the best method would be to create invisible solid walls only immediately around the player. That gives the behavior something to respond to.

    Here is a example that creates a platform if pixels are in range:

    http://dl.dropbox.com/u/5426011/examples16/destroy_ball_with_platform.capx

    I increased the size of the test object to increase the sampling area, but it also slows everything a bit.

  • The canvas plugin can be used to do per pixel collisions on top of being designed to do the visual portion.

    http://dl.dropbox.com/u/5426011/examples16/destroy_ball.capx

  • The error is coming from the calljs plugin, hence cjs_plugin.js.

    The ReadExecutionReturn expression is not returning a string.

    I can replicate the error with two actions:

    CallJS| execute "0"

    Text | set text to CallJS.ReadExecutionReturn

    It's not a fatal since "0" is returned just fine. The assertion failure is also triggered when calling ReadExecutionReturn if js code with syntax errors is run.

    To eliminate the assert edit \CallJS\runtime.js and find ReadExecutionReturn which should look like this:

         exps.ReadExecutionReturn = function (ret)     
         {
              ret.set_string(this.returnValue);
         };

    and change it to this:

         exps.ReadExecutionReturn = function (ret)     
         {
              ret.set_string(String(this.returnValue));
         };
  • It appears that it may be a bug. It's acting like the "or" is not in the event.

    A workaround would be to split the event into two, one condition each, both with the same actions.

  • It takes 3 arguments since the action takes 3.

    The first argument is a combo which is just a number index in python:

    0: set

    1: add to

    2: accelerate

    3: deccelerate

    The second and third are speed and orientation.

    Other than looking at the plugin headers to find the python names of ACEs I also utilize pyshell with the dir() function to browse for the names. For the arguments I look at the ACEs in the event editor.

    Numbers and strings are the same in python.

    Combos are just number indexes.

    ObjectTypes are either an oid number or a string of the object name.