bigpappapuck's Forum Posts

  • All,

    Just out of curiosity, what is the difference (if any) between using floor(x) and int(x)? I noticed they were listed in different sections in the manual.

    Thanks

  • Thanks guys! This is great!

  • All,

    I'm not much of a programmer, so thankfully C2 is here to help. That said, this question is for the experienced programers out there.

    Let's say you have 3000 events and things work great. What (if any) would be the advantage of cutting those events down to 2000, if the end result would be just as before - things work great?

    Thanks!

  • 1) no worries, i use text boxes and type what the spritefont says as a workaround

    2) ah... if you already have an icon, then I must not have your updated version!

    thanks for the quick reply!

  • Mipey, your plugin is awesome!

    Any chance we will see an update in that future that:

    1) allows us to see the text in our preview layout?

    2) has an icon attached to the plugin?

    thanks

  • Thanks Ashley!

  • All,

    I don't know if this is a bug, or just my lack of programming knowledge. I created as simple a capx as I could the illustrate the problem.

    On program start, I define two arrays.

    #1

    box - (x,y,z)

    x = statistics for box ie, maxHP, atk, def, etc,

    y = boxes lvl, ie, 1, 2, 3, etc

    z = which box, ie, red or orange

    #2

    curVar    - (x,y)

    x = cur variables held, curHP, curLVL, curName, etc

    y = which box, ie, red or orange

    In my code, I use positions in the curVar array to call position in the statistics array,

    For instance,

    Example A

    "HP: " & curvar_array.At(3,menu_box.box)& "/" & box_array.At(1,curvar_array.At(2,menu_box.box),menu_box.box)

    and

    Example B

    "HP: " & curvar_array.At(3,select_box)& "/" & box_array.At(1,curvar_array.At(2,select_box),select_box)

    Example A calls from the instance variable set on the text box to display the info in the array.

    Example B calls from a global variable - select_box, which is defined based on where one clicks - to display the info in the array.

    Example A works fine, but Example B breaks the code.

    If the global variable - select_box - is set to 0, the code breaks even though I define the array at (0,0,0), but if on start of layout I set select_box to 999, the code works fine.

    The error message I get is:

    "THE PAGE AT THE LOCALHOST: 50000 SAYS:"

    "Javascript error!

    Uncaught TypeError; Cannot read property "0" of undefined

    localhost/Arr_pluging.js, line 102

    This is either a bug in Construct 2 or a problem in a third party plugin or behavior - please report in to the developer!"

    Here is the capx for reference:

    dl.dropbox.com/u/70332704/arrayerrormsg.capx

    Thanks for taking a look at this

  • Thanks to the awesome help of the community I managed to achieve a good grid movement, that snaps to the grid, checks for walls and even mob collision. Would it be possible to create a behavior that does the same ?

    Would you be able to post a capx of your successful grid movement?

  • Thanks for the help. I got what I needed.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks guys. This is much cleaner than what I had going.

    That said, I was hoping I would be able to alter this grid. Sometimes, for instance, I may have 5 in a list in one column, 3 in a list in another column, and maybe only 2 in a third column.

    Also, depending on actions taken in the game, one of the center pieces may disappear and reappear. I could, for example, flip a switch and the center piece disappears. In that case, I would want to the cursor to pass over the now missing piece, and adjust automatically to the next piece.

    Any thoughts?

  • Ive been hitting my head against the wall and cant seem to get this to work.

    I want to use the arrows keys to move from box to box both horizontally and vertically.

    I originally had a series of

    If yellow1 and left pressed, then move to purple1

    If purple1 and left pressed, then move to blue1

    If blue1 and left pressed, then move to yellow1, etc

    As you can see, this will turn into a significant number of code lines.

    In the name of efficiency, I tried setting up a while loop with instance variables that are both active and inactive. While active (=1), the cursor will scroll over them, While inactive (=0), the cursor will skip over them and head to the next instance.

    As it stands now, the cursor will cycle through all nine objects... I would like it to recognize columns and rows, but I cant figure out how to do it other than the original way it was set up.

    Any assistance would be appreciated.

    dl.dropbox.com/u/70332704/simple%20menu.capx