Juanito-cnstrct2's Recent Forum Activity

  • LimonSpace and BarneyK : I recommend you use the following event/action code instead of the scroll to behavior:

    Condition:

    Every Tick

    Pick Player by UID (in my sample I store the player's UID in the Controller object's MineUID instance var)

    Action:

    System->Scroll to object (choose the player)

    That would allow C2 to pick the sprite owned by the player and scroll to it.

  • itza3985 controller is just a background object that I use for the sole purpose of holding variables that are used to "control" the flow of the game.

  • I just wanted to share some news about TypeScript which is basically a super-set of Javascript that allows static types and traditional classes (among other features):

    http://blogs.msdn.com/b/somasegar/archive/2012/10/01/typescript-javascript-development-at-application-scale.aspx

    The compiler compiles to regular javascript. If you like using Intellisense (some don't) then TypeScript could be a great way to write the guts of your plugin in Visual Studio.

  • ekalostz :

    1. Are you minifiying the export (un-check "Minify")

    2. Are you putting the exported files into a web server like IIS or Apache? (I don't think it will work if you just double click the generated index.html file)

    Thanks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • LimonSpace A few things:

    1. when I go to 93.145.237.246/index.html, the game there is minified. Export the game to your apache server without minification. It will help when troubleshooting.

    2. When you were connecting using Firefox, were your connecting to the index file hosted in your apache server? sor some reson the error you got in Firefox is not minified and you got the following error:

    [18:51:17.860] TypeError: this.Y is undefined 127.0.0.1/c2runtime.js:132

    Is there any way in Firefox for you to copy and paste the code lines around that line (line 132 of c2runtime) so that we can see them?

    3. Why are you adding var socket = io.connect('http://93.145.237.246:8099') to your index file? The plugin is supposed to connect to server you tell it to inside your C2 event sheet. Connect to your node.js server using the plugin actions in C2. The above line will not help you and will only confuse you more.

    Thanks!

  • LimonSpace, hmm, you will need to get rid of those runtime errors first. Get the latest version of the plugin and make sure you put the runtime.js and edittime.js files in the correct place. Check if you are using the latest c2 version as well.

    also, after exporting the game delete the appcache file. do not minify yet.

    If u get the error again in Chrome, click on the blue link next to it and it will take u to the code line where the error occurred. Take a screenshot of that.

  • LimonSpace can your client run the game with chrome? If so can you check the console in chrome and look for any errors there?

    Also, what is the Url that the external client uses?

    If you connect within your home network, does it work?

  • actually there is another post in this forum (http://www.scirra.com/FORUM/xbox-360-internet-explorer-app-html5_topic57053.html) about a new IE app for the new xbox dashboard.

  • I second the suggestion to introduce some form of event re-usability in C2. IIRC, MMF had something called "behaviors" that were basically event sheets attached to the objects. Inside those events you would reference other "families" (I really don't remember the exact terms) so you could just copy and paste your object into another project and those events would work if the "families" were in the new project. I am sure Scirra has already thought of something similar and maybe they are working on it.

  • Kyatric please remove "Isometric Z ordering based on Y" plugin from the list. The built-in "for each ordered" should be used instead.

    Thank you!

  • accidentallyc I guess I did not fully understand your second question. Writing plugins is not that complicated, especially if you were to write a plugin just for your game, for private use.

    Assuming you want some custom javascript code executing every game tick, your plugin could have just one C2 "action" defined in the edittime.js and then have that action be called from C2's every tick event. The runtime.js would be as complicated as you wanted to be. If it you just need a few lines of code then the JS function that gets called when the action is fired would have only a few lines of code. That code can access any C2 object instances and their behaviors and properties.

    If you want some custom code to be called when a certain event is fired, then instead of having your plugin action called on every tick, just call it when the the event is fired.

    Another way of "text editing" the C2 events is to open the event sheet files in a good text editor, but that is definitely not a supported (or good?) way of doing things and you have to be very careful (make backups!).

  • BrianOD I had somewhat the same question about mobile screen sizes here. I was pointed to a tutorial which helped me: scirra.com/tutorials/73/supporting-multiple-screen-sizes

Juanito-cnstrct2's avatar

Juanito-cnstrct2

Member since 26 Apr, 2010

Twitter
Juanito-cnstrct2 has 1 followers

Trophy Case

  • 14-Year Club
  • Email Verified

Progress

15/44
How to earn trophies