Majinboo's Recent Forum Activity

  • I have a big list of names with age, type and level information,, i want to create 1 object with those information in variables, i don't know how to put those information in variables without creating many sprite object outside layout, maybe i need to use an array but i don't know how to use it in this case, and with the array creator how i can import 500 or more information to the cells without doing all this work manually? i have this list in a txt file, please give me ideas, i dont want to create 500 sprites outsite layout of course, i just want to put those names, age, type and levels in variables when the monster is created and i want to created those monsters for level, for example create 10 monsters level 1. etc..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Majinboo

    well, I am not sure I fully understand what you are trying to accomplish here, but I restructured your capx the way I think you want it to work... (it looked like you wanted to allow up to 2 of any name to be pinned, but after that no more of that name could be pinned).

    I didn't use the HavePin and PinDuplicated variables because I was able to do it without them, and they were just complicating things (you were only marking pinned ones as duplicated but that was not stopping additional ones of that name from getting pinned because if they were unpinned they were not being told that name was already duplicated).

    also, you were running the duplicate check on every tick - over and over again, even though most of the time nothing was changing. It is good practice to only check for things when something changes. So, now it only looks for duplicates before it tries to pin the current instance.

    http://www.rieperts.com/games/forum/PinnedObjects.capx

    You are awesome!!!, thank you so much!!! i will study this amazing example to understand more about construct 2, i never thought that a global variable can store values of different objects.

  • This works only with individual objects and after destroying the pinned object i cant get the Boolean to false!, i want to set PinDuplicated "true" to all objects of the same type, for example if i have two pinned objects to two objects of the same type then all objects of the same type will have PinDuplicated "true", i dont why this is so hard to me, maybe i have low IQ? I was bad at math in high school .

  • Majinboo

    I would do the UID instance variable the other way around:

    instead of storing the names,UID in the PinName object, I would store the PinName.UID in the names object.

    Then, anytime you pick a names object you can see if its PinNameUID variable is 0, then you know nothing is pinned to it. If there is a value in there, then you can pick the PinName object directly by that UID (rather than having go searching for PinName objects pointing back to the names object). That should simplify your code a lot.

    (unless, of course, you want to have more than one PinName object pinned to the names object at a time... but it doesn't look that way to me)

    thank you for your help, now i can identify objects with pinned object, but i am trying to identify "duplicated" objects with the same type of pinned object and didn't work by this way:

    or

    Even i tried to pick Names object with the same UID and didn't worked.

    CAPX:

    http://www.filedropper.com/identifypinn ... atedpins_1

  • >

    > > Scratch that

    > >

    > Sorry, i don't understand, what i need to scratch?

    >

    Sorry.. I gave a wrong solution so I edited my previous post..

    Was a bit too quick with my answer..

    I cant see the solution

  • Scratch that

    Sorry, i don't understand, what i need to scratch?

  • i want to identify objects with pinned objects, i tried a lot of combinations and i cant find the solution, please help me! and explain me why this didn't works because i spend 3 days trying to solve this, i really want to understand.

  • Try this :

    Finally this worked, thank you so much!!

  • I want to count each different objects inside the family instead the whole family objects ( example two charlie names exist then = Boolean duplicated true ), i cant realize how to do this, please help me! , i cant use local or global variables because i have a lot of names, i just want set Boolean in duplicated objects, i tried a lot of combinations, i have several hours breaking my head with this, this cant be done?

  • It seems that this solved your situation.

    No, the example below isn't worked

  • Lol I had prepared a little capx to show you the method (with local variable and pickedcount for the last)

    thanks for the example but think if i have hundred of different fruits, i cant use local variables.

    i tried this again and now didn't work, the last object didn't update the Boolean, if i have two oranges or more i want to set the Boolean duplicated true but only to oranges or other duplicated objects, how this can be done? i cant use local variables because if i have a lot of objects in a family then will be a lot of local variables.

  • you could use something like

    1/ system pick by comparaison object fruits families when fruits.animationName= "Orange"

    - system compare two value fruits.pickedcount >=2 ---> Set text to "I like Oranges"

    Now Its Working, thank you!!!!! i learned something new today

Majinboo's avatar

Majinboo

Member since 21 Jun, 2015

None one is following Majinboo yet!

Trophy Case

  • 9-Year Club
  • Email Verified

Progress

10/44
How to earn trophies