lionz's Forum Posts

  • For the green sprite you need to use a condition in the function 'pick sprite by UID' and the value is the function parameter.

    Create permutation on start of layout and in debug view you can see the order of numbers. Say you have 5 questions and the numbers given are 3,1,2,5,4 then that means question 3 would appear first then question 1 etc.

    You can access the data by setting a global variable for current question number to 'advancedrandom.permutation(0)' that would be the first question so 3 in this case. Then the next question would be advancedrandom.permutation(1) etc, so I guess the number in brackets would be a separate variable that increments as you go onto the next question.

    This number would also relate to the row of the array so lets say for the first question the current question variable number is 3, then you access the array using this array.at(questionnumber) so array.at(3) finds the question.

    So you are pulling two bits of data, the next question from the permutation table and then using this number as the row of the array to take the actual question text.

  • If it's a very simple shop then you can just place them in the layout and go to it. If it's more complex you could use an array (check the manual) to store the data of all the weapons. You can store weapon names and co-ordinates in an array spreadsheet style file then on start of layout load all of the data into an array and run it.

  • Yes but you can't do that when adding it as an obstacle, it is the object or entire 'family'

  • Hey, if you already sorted the arrays out and ordered values on xyz then you should be able to pull values? Try it and see

  • From what I am seeing in the gif and from what you described below particularly 'The main issue is that its global and changes a different object's obstacles because they share the same family behavior.' you should go for specific objects outside the family.

    Families are good for applying one thing to everything in the family to minimize redundant events but they're not good for doing the opposite and setting one family member with one option and another family member with another option, for this you should go onto specific objects which also will inherit the behaviours to be used from the family.

  • "I'd much prefer a list of obstacles attached to one object. rather than applying it to all other object types in the family."

    That's what a family is used for. You can use the individual object if you don't want to apply to many objects.

  • On turret behaviour you are adding objects for the turret to target, on line of sight you are adding obstacles that block the line of sight. Maybe you are thinking about LOS in the wrong way.

  • You can use a loop from the array object for each x,y,z to compare if the current value is "1" for example, then when you have the location compare at Z=0

  • You have an issue because whatever method you used to pick random rows is producing repeated values. If you use the permutation table as mentioned it creates a shuffled set of numbers with no repeats so you can use this to take values from the array.

    You can send the UID of the sprite clicked through the function as a param, and then within the function if answer is correct select sprite by UID and set it to green.

  • 1. Use advanced random, something called a permutation table to generate a random sequence of numbers then pick the corresponding row from the array.

    2. Wouldn't you just set it to green as an action where you also set it to "Correct", or are you asking how to set it to green in general?

  • When you use condition object A on collision with object B, it picks that one instance of object A to destroy.

  • Yes that looks better, nice :)

  • It's strange that you posted an image of almost the full event but not all of it. If the controller works then I see no reason why the enter key wouldn't work. As a standard though I don't like to put trigger conditions in a sub event because things can get weird.

  • You can use the Mouse object, and 'on object clicked' condition.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Use a new object