ramones's Recent Forum Activity

  • With the Browser object and the javascript btoa() function:

    base64encode.capx (r140)

    <img src="https://dl.dropboxusercontent.com/u/8367729/construct/pics/base64encode_1.PNG" border="0">

    <img src="https://dl.dropboxusercontent.com/u/8367729/construct/pics/base64encode_2.PNG" border="0">

    I'm pretty sure there's a 3rd party plugin that does it as well.

  • The behaviors that interact with solid are 8-direction, platform, car and bullet (with bounce off solids enabled). If your enemies don't have one of those behaviors for movement then you'll need to handle collisions with solid objects yourself.

  • I just set the text to blank and then append the 4 letters in the loop. If you didn't set the text to "" first you'd be continuously adding letters onto the end of the string.

    You could add the the letters to a variable and then set the text equal to that variable if you wanted to do it that way.

  • Here try this:

    next4Treasures.capx

  • Use a global variable to track if the level is over or not and only spawn the blood if level is not finished.

  • <img src="https://dl.dropboxusercontent.com/u/8367729/construct/pics/saveDictToWebstorage.PNG" border="0" />

  • Print out the width/height/depth of the array when the button is clicked. And make sure there's no stray spr_playerspawner at (0,0) and that there is a spr_playerspawner on the layout :)

    Either the array is the wrong size and the value isn't being set when the button is clicked or the value is being set to 0. If the array is the correct size you could try setting the value to -1 and see if it changes.

  • Are you loading the array from JSON somewhere in your event sheet? If you had saved an array of width 15 earlier and were loading that it would override the width of your array. Just a guess.

  • VectorX is 600 but the platform max speed is 330, that's why the horizontal movement quickly stalls. I'd probably do it like this.

  • Well you're spawning a ball if ballcount <= 2 in event 22 and it always is because of event 21. You could rearrange it like this:

    <img src="https://dl.dropboxusercontent.com/u/8367729/construct/pics/ballcount.PNG" border="0" />

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yep any files added as project files are exported with the project.

  • When you have the array filled you can use the array Download action to save it to a file:

    <img src="https://dl.dropboxusercontent.com/u/8367729/construct/pics/arrayToProjectFile01.PNG" border="0">

    <img src="https://dl.dropboxusercontent.com/u/8367729/construct/pics/arrayToProjectFile01a.PNG" border="0">

    When you run that action it will pop up the save file dialog or just save the file directly to your download folder depending on how you have your browser set up:

    <img src="https://dl.dropboxusercontent.com/u/8367729/construct/pics/arrayToProjectFile02.PNG" border="0">

    The file looks like this. It's the array in JSON format (I call it 'level.json' and have notepad set to open .json files. You can call it 'level.txt' or anything really.):

    <img src="https://dl.dropboxusercontent.com/u/8367729/construct/pics/arrayToProjectFile02a.PNG" border="0">

    You could also create this file by hand or generate it with code.

    Now you can add that file to your project (When you want to change the level just open this file from within C2 and edit it instead of deleting and importing it again.):

    <img src="https://dl.dropboxusercontent.com/u/8367729/construct/pics/arrayToProjectFile03.PNG" border="0">

    <img src="https://dl.dropboxusercontent.com/u/8367729/construct/pics/arrayToProjectFile04.PNG" border="0">

    Now you need to add the AJAX plugin to the project and request the file:

    <img src="https://dl.dropboxusercontent.com/u/8367729/construct/pics/arrayToProjectFile05.PNG" border="0">

    <img src="https://dl.dropboxusercontent.com/u/8367729/construct/pics/arrayToProjectFile06.PNG" border="0">

    When the request has completed, the value AJAX.LastData will hold the contents of the file. Use the array 'Load' action to load it into the array.

    <img src="https://dl.dropboxusercontent.com/u/8367729/construct/pics/arrayToProjectFile06a.PNG" border="0">

    <img src="https://dl.dropboxusercontent.com/u/8367729/construct/pics/arrayToProjectFile07.PNG" border="0">

    <img src="https://dl.dropboxusercontent.com/u/8367729/construct/pics/arrayToProjectFile08.PNG" border="0">

    Example: levelEditorExample.capx (r139)

ramones's avatar

ramones

Member since 17 Apr, 2012

Twitter
ramones has 4 followers

Trophy Case

  • 12-Year Club
  • x4
    Coach One of your tutorials has over 1,000 readers
  • x2
    Educator One of your tutorials has over 10,000 readers
  • Email Verified

Progress

15/44
How to earn trophies