Waltan's Recent Forum Activity

  • Hi guys, my name is Vlad and i'm from Russia :3

    I like pixel art style games and indie games because it's full of soul, lol :D

    Im spending too much time working in Construct Classic on my game to win dev. competition.

    One thing which i hate in CC it's bugs, there is a lot of them :c

    That's all, thanks.

  • Here you are:

    http://www.mediafire.com/file/3rb8r4xz1gzdkd5/database_array_simplified.cap

    It was just a matter of indirect referencing, if you look at the events you will instantly see what I mean. But feel free to ask, if it is not obvious.

    I found some kind of bug. When system using id from array it uses id thats compare of array index (id = 3 array = 3,1)

    I added 3 objects that is not compare array's indexes and 1 which is compare. First 3 doesn't work and last one works fine.

    screen of array

    cap file

  • Here you are:

    http://www.mediafire.com/file/3rb8r4xz1gzdkd5/database_array_simplified.cap

    It was just a matter of indirect referencing, if you look at the events you will instantly see what I mean. But feel free to ask, if it is not obvious.

    Thank you very much!

  • Please excuse me, but I still don't understand.

    Do you want the inventory to be saved everytime when it is changed, instead of just on exiting?

    Sorry for my bad english.

    So ok, there are 2 ways to create necessary object.

    First one:

    <img src="http://s1.ipicture.ru/uploads/20111102/zA72Xk5J.png" border="0">

    It's inconvenient way, because you need to add every id by yourself every time when you wanna add new object in game.

    Second one:

    <img src="http://s1.ipicture.ru/uploads/20111102/yzsWVOiT.png" border="0">

    This way using database array to detect necessary object and it's even more easier then first

    On startup event, i have first way to create objects (where i need to type every id) but i want make it like in second one but I can't do it.

    I hope now you understand :<

  • > This is pretty fine system but i can't make it works to load objects on start up. (?21 and ?25 events in example).

    I'm not sure what you mean. It works for me, loads the items from the array and shows them at the correct places. I can place items in the inventory, I can move them around and they get saved when exiting the application. The next time I start everything is loaded correctly as it was when exiting.

    I want these events to replace on these but i when i'm trying to do it, it doesnt works.

  • this

  • So, i found a way to make system use some king of database and it's hopefully works except one thing.

    (You need to download this file :3)

    You have 3 arrays.

    1. Inventory

    2. In-game objects

    3. Database

    The database represents the tablet with object "id" and name.

    What i'm using in my example:

         x1    x2    x3

    y1   ?1     2     3

    y2 stick stone apple

    and when you drop item, system compare item's id and id in array and using name under this id to create object.

    This is pretty fine system but i can't make it works to load objects on start up. (?21 and ?25 events in example).

    And i again hoping on your help guys :P

  • So yeah i did it. I made an array where are stored all the id and object names. And when you drop item or pick block system using this array to create the desired object.

    image 1

    image 2

  • If you had made all your inventory objects the same object, but with different animation frames, you could have done:

    On click on blocks,

        create INV_OBJECT

        set anim frame to block('id')

    and the same with your drop function. Since you made them all different objects though, Now you can rename them to inv1 inv2 inv3 etc. and use create object by name;

    On click on blocks,

        create by name "inv"&block('id')

        

    I also have array wich using id var to create blocks on load, so i think there will be problem with your way.

  • In my project i have 2 types of objects.

    1 is blocks

    2 is inventory items

    each of them have "id" var.

    block "wood" (id 2) item "inv_wood (id 2)" and etc.

    And to tie them I had to make "big" event with all of their "id's"

    image 1

    image 2

    Is there a way to make sure that the system itself staring id of both objects and select the desired

    For example:

    On "Items" Drop ->

    ?"Items" [id] = "Blocks" [id] -> Create object "Blocks" at x y

    I hope you understand me :3

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You could use:

    + MouseKeyboard: On Left Clicked on Sprite

    -> Sprite: Set 'drag' to 2

    + Sprite: Value 'drag' Equal to 2

    + MouseKeyboard: Left mouse button is down

    -> Sprite: Set position to MouseX, MouseY

    + MouseKeyboard: On Left mouse button released

    -> Sprite: Set 'drag' to 1

    sample cap

    <img src="smileys/smiley1.gif" border="0" align="middle">

    You are my hero :3

  • What exactly doesn't work for you?

    For example inventory.

    dl.dropbox.com/u/34384736/drag%26drop.cap

    Put red sprites on the black. Then press 1 (to turn off drag'n'drop). After this try to drag some red sprites again and then press 2 (to turn drag'n'drop on) and you will see what i'm talkin' about.

    What exactly doesn't work for you? And if so why don't YOU make it and share with the community?

    I'm too tired today, lol :c

Waltan's avatar

Waltan

Member since 5 Jul, 2011

None one is following Waltan yet!

Trophy Case

  • 13-Year Club
  • x4
    Coach One of your tutorials has over 1,000 readers
  • x2
    Educator One of your tutorials has over 10,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

17/44
How to earn trophies