lionz's Forum Posts

  • I see what you mean, I was checking Family colliding with Family or Sprite colliding with Sprite. Is it essential that you use the logic Sprite colliding with any Family? I would just use the object name for picking as inheritance on families is strange.

  • If 'Block' is a Family itself then PickedCount is 2, if 'Block' is within a family, PickedCount is still 2. Your PickedCount return action must be in the wrong place.

  • Where it says 'Loader style' set it to 'nothing'. Although depending on the device or your setup it may just show a black screen instead of the blue load bar.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It refers to the ones involved in the collision. On object collision > sub-event : Pick instance 0, Pick instance 1. Instance 0 is the first object to collide, instance 1 is the one collided with. So if you set up the following :

    On sprite colliding with sprite :

    ----Pick sprite instance 0 : Text 1 set Text sprite.UID

    ----Pick sprite instance 1 : Text 2 set Text sprite.UID

    Text 1 would show the UID of the sprite that collided and Text 2 would show the UID of the sprite that it collided with. This is how I do it when it is the same objects that are colliding.

  • Yes it's because of the wait. You are not destroying the player object when it dies, rather repositioning it so the player can move the sprite whilst the wait is going on. Put the wait outside of the function or don't use a wait at all as in the above example.

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