edwardr's Recent Forum Activity

  • ok, I found a way, which works but it is not nice....

    Maybe somebody has a better idea:

    tokenat(JSON.Value(0,1,"Test"),choose(0,1,2),",")

    tokenat(source, position, separator)

    source: is JSON database

    position: the random effect is in the position choose(0,1,2)

    The disadvantage is: that I have always to put the same quantity of numbers in the json value, otherwhise there will be an error (no number or it won't be choosen).

  • danju92: you can't expect that somebody will code it for you. You have to read the forum, download and try the samples and ask specific questions. (Like what is not working or there is an error) Also a sample what you have would be nice, so it's easier to find the mistake. In this forum you get tips and hints what you have to do, but programming you have to do it yourself. Beside that if you are more polite, maybe you will get more help.

    What you are looking is not help, but rather a programmer. I recommend you should check this:

  • I use animation, because if I want to change an image later to an animation, I don't need to reprogram it. You also can have a animation with just 1 frame, so there is no big different (I didn't see one).

    Also within an animation you can have several frames.

  • or is there another possibility to have a weighted average and get the info from a database (json))

    e.g.

    Product 1: 0,0,1,2,0,1,0,2,0,

    Product 2: 0,2,1,0,2,2,0,1,2,0

    with choose(), I can weight it by saying e.g. choose(0,0,1,2). That means there are 50%: 0, 25%: 1, 25%: 1

    but I want to get the information (0,0,1,2) from the database, because I don't need to program extra variables and compares. Right now I get all the information from the database: cost, price, production time, name,... but not how many products could be sold within a day

  • I use more Event Sheets:

    e.g. one for functions, one for global variables, one for Level 1, one for Level 2, ...., one for database (because I use several databases, comments within are not necessary)

  • choose(0,90,180,270) ??

  • Hi

    I would like to combine choose() with Json. The variables should be in the json database and send to choose().

    instead:

    choose(1,2,3,4)

    it should use something like that (but it's not possible) :

    choose(json.value(0,0,"Test"))

    has somebody experience or tried something like this before??

    thx in advance

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • volkiller730: you are right, i had once a similar problem, since that time I put them in a separate sheet.

    : I checked and tried. My way doesn't change anything. I add also an separate variable (constant one) or change the text field. Nothing happened. It seems that all variable are lost. I'm sorry, but I didn't find a mistake.

    The funny part: I add a new layout, just a blank one and changed if plane is destroyed go to the new layout and show variable. There it works. So the error is somewhere in the event restarts.

  • ok you have the global variable in Events menu, where it is used and active, but not in Restart.

    I would suggest that you put all global variables in an Extra Event sheet and then include it in all the others Event Sheets.

  • try this:

    add global variable: test / number

    on start of layout - set Value "test" 10

    add text

    every ticket - set text "test"

    if you use several layers: do you load all event Sheets? (because each layer has own Event Sheets) Event sheet, right click, include Event sheet

  • full Editor: there you can upload

edwardr's avatar

edwardr

Member since 15 Dec, 2014

None one is following edwardr yet!

Trophy Case

  • 9-Year Club

Progress

9/44
How to earn trophies