korbaach's Recent Forum Activity

  • I want to create an apple if the apple is randomly chosen, from a family where all 3 - orange banana and apple are inside the family.

    I think you can't..

    you cant write... create family member with instance variable "apple"

    but if I'm right this is going to do just that...

    random_Pick="apple"

    if c2 coose apple fom family..stop loop..everithig is ok..

    else keep trying(create&destroy) until you find apple..then stop

    Of course this does not make sense with "Random_Pick" variable,you dont need two times random pick..

    (variable and family (already picking random))..but if you have variable "Specific_Pick"..

    and set variable to specific fruit.. Specific_Pick="apple"..then you'll get apple

    have you even tried this?

    ..maybe I'm wrong

  • I mean something like this..

    so when you create sprite from family c2 take a random sprite..if is random sprite =Random pick..Stop

    else destroy and create new sprite..until you find Random pick

  • ..but could you explain with comment in each event that what is that doing..

    I'm sorry but I think that's a little bit excessive...

    BtnRestart on clicked-Restart Layout

    i think this is clear..also LocalStorage..

    On Start-check

    if missing -do someting

    if exists-get

    on get-do something

    only the array can be a little confusing..if you do not visualize how it actually looks

    so..in example you have 5 instance of same sprite..first instance always have IID=0;second=1

    just like frames in animation..array same case..first cell have index=0;second=1 etc

    so when you click on instance with IID=2..you save "clickCount"value in array on index 2

    then you save Array as Json...

  • Lets say I have: apple|orange|banana in my Fruit_family.

    The sprites are called apple, orange and banana respectively.

    Also I created a text variable: Random_Pick=""

    At the beginning there is a draw = pick either: apple, orange or banana.

    All is good, that all works I get the desired output when using output value to text.

    At this moment when I draw orange I get Random_Pick="orange"

    Now I would like for the Fruit_family to spawn the orange that I the system has randomly picked at the beginning at a certain location.

    I did as you suggested, added "Signature" Instance Variable to the Fruit_family, and named each of the objects as their sprites:

    apple=apple, orange=orange, banana=banana

    if you use while loop and "Random_Pick"?"Signature"...Destroy ?

    like in this capx WhileDestroy.capx

    just spawn families and check "Signature2...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • something like 2NumbSum.capx ?

  • ishmaelmoreno here is new capx: boomerang.capx

    (does not require plug-ins)

  • In this particular case,it's easy..just use Array

    Template_InstanceVariable.capx

  • ... please tell me and I'll send you my capx.

    please...

  • I'm still not able to make it possible to move from chest to chest or from chest to inventory. I mean from one Z index (Storage) to another.

    you probably need to save Z-index of first item...

    something like:.......................................................................... ArraySwap3D2.capx

  • Is it possible to use this solution to save user information (items/sprites arrangements for example?)

    Tilemap is this example just one object ..if you have multiple sprites objects (Sprite1,Sprite2...)

    check this capx

    AjaxArrayDictionaryLocalStorageFileChooser.capx

    (in example I only save x&y position..but of course..you can save frames, animation,instance variables...)

korbaach's avatar

korbaach

Member since 9 Sep, 2014

Twitter
korbaach has 3 followers

Trophy Case

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

Progress

12/44
How to earn trophies