lionz's Forum Posts

  • With the on collision event, you can use Pick nth instance, instance 0 and instance 1 will be the two blocks colliding with each other and you can reference and use them in that way.

  • Well you wouldn't need the Else then, 'Is downloading update' will be enough as you're checking them every tick. What is the issue then, can you post a screenshot of the outcome and the box displayed? Are you referring to the Construct 2 progress bar?

  • Those browser events probably need to be a sub event of 'on start of layout'? They're separated out so they run every tick and the Else will not work correctly.

  • How are you enabling the 8-direction and spawning the player? If you return to a layout with a sprite that had 8-direction assigned then it should just work so must be an error with the logic somewhere.

  • What event logic did you use to try and set the text, was it Set CSS Style?

  • Dropbox is the way, my saviour on a number of occasions.

  • Well it will need tweaks for sure. You can put in a condition that checks if you're already overlapping an imagepoint then don't do this action. There's a detection in C2 for nearest/furthest. You could incorporate that somehow to find the nearest imagepoint to the sword and only trigger that one. It's all about investigation

  • 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...