lionz's Forum Posts

  • Oh and to grab the actual text value from the array it'll be something like 'For Answer A Text Box > Set text to array.at(AnswerA)' where AnswerA is the global variable i.e. the location in the array that was randomly generated.

    And the .capx https://dl.dropboxusercontent.com/u/495 ... squiz.capx

  • This is verrrry basic and longwinded and can probably be done faster by passing the same parameters through a function or something, but for the structure...and a quick 5 min job...something like this works as far as generating 4 random answers from the array, I just set it up and tried it. Also I guess it answers your original question of how to set up functions with the structure they use in C2 :

  • I'm no programmer but in C2 I would start out by doing this :

    Choose a random number for question, if question Q is 5,0 in array then A = 5,1 (or simply 5, the x-coord of the question and answer)

    Generate a random number for B probably use floor(random(array.total)), check the outcome does not equal A then use that for B.

    Do the same to generate C, making sure it is not the same as A or B, and for D make sure it does not match A, B or C.

    Then you have 4 answers A, B, C and D that are numbers i.e. 5, 6, 1, 22 that match the co-ords of the array, where A is the correct answer and B, C and D are random answers.

    Then assign A, B, C and D randomly to 4 numbers 1, 2, 3 and 4 that match the answers boxes.

    There are probably better ways of doing this but that would be my initial approach.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 1. You disable it with the action ScrollTo > Set Disabled when the player falls down the hole.

    2. The manual states that you can't directly adjust it. You can however create an invisible object that you ScrollTo, which I guess would act like an invisible camera. For example, if you Pin an invisible object to the player, offset from the player as much as you want the player to be off-centre, then you assign ScrollTo to that object, the invisible object will move with the player but the ScrollTo will be focused on the invisible object. Alternatively, you could also allow the invisible object to move freely if you want it to change throughout the game, if you want the player to become centred again then disable it on the invisible object, enable it on the player etc etc

  • I use just one action (system pick) :

    Imagepoint 1 is the foot here so it breaks down as : if sword is colliding with the foot > spawn blood on the foot.

  • Something like this :

  • You use image points, under the spawn action you'll see the Object but also Image Point. If you open the image editor, the default image point is 'Origin'. You can create other points on the image, and spawn things on them using the spawn action.

  • I can't believe this game isn't called Shootasaurus Rex yet, what is going on...

  • it is useful. it will allow you to spawn something on the same layer as the player without creating additional logic to find out what layer the player is currently on, if you know what I mean. The info is already stored in 'player', or whatever the object is.

  • I set up the same logic and it works fine for me, pinned to the imagepoint without error.

    Also, did you notice that you are spawning the bomber on imagepoint 4 but trying to pin it to imagepoint 5? Is that intentional? Part of the problem might be that if image point 5 does not exist, it will use the origin.

  • Do you mean block all sprites from being dragged and dropped? You can set a variable around mouse click where the click only works when variable=true. When the sprites collide, set this variable to false for 5 seconds, and then back to true.

  • Yes it will spawn the object on the layer that the player is on at the time the event is triggered. player.LayerName is the current layer that the player is on.

  • It really depends on how you've set up the general endless runner gameplay but what you've described there is creating invisible 'spawn points' which sounds about right. You could have a 'numStacked' variable which picks a random number which relates to how many are stacked on top of each other. You could have this in an obstacle Family so you only have to set the number of stacked items once.

  • Put them both into the same mouse clicked event as sub events and have the small_bug_skins = 0 as an else should work. It will then only run one of the events each time.