cvp's Forum Posts

  • Not as long as you use it within the overlapping as with the overlapping you have limited the amount of objects 'pick nth' will look at.

  • You could use 'Pick Nth'. 'Pick instance 0' will pick the first instance involved in the overlapping, and 'Pick instance 1' will pick the second.

    in your case:

    when sprite is overlapping sprite

    system --> pick Sprite instance 0

    Do stuff

    or however you want to accomplish your goal. But you can pick the once involved in the overlap by 'Pick Nth'

  • I had some trouble trying to figure out what you wanted to do.

    So i actually started from scratch. (you made a lot of stuff different from how i would do it)

    here is how i would do it with families:

    https://dl.dropboxusercontent.com/u/2560922/mobiledev/forum/families.capx

    The reason why your sample is not working is because of how you do "picking". But hey.. I still get confused about picking

  • Lordshiva1948

    Thank you. And thank you again for taking the time to look at the topic. Always nice with some input

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Not from that no. sry. (capx debugging is hard without the capx)

    Try to revert the resent changes you have just made. You apparently did something Construct 2 didnt like

  • cvp

    ok. thanks.

    Can you reply in my thread too?

    you mean this: Comparing X coordinates of player and enemy?

    I briefly looked through it, but the wall of text stopped me

    Think you should post a small capx that has your error inside it, then its much easier to look at and debug instead of reading a lot of text and not quite knowing what you want to achieve. (thats just my personal preference, i like to look at a capx, makes it easier to answer questions)

  • sgn15 have a look at the post i made just before you posted yours

  • I'd like to ask a further question.

    If I want 5 enemies to randomly have health between 20 & 30, can I set an instance value of Health 20, and then set an event random command to give the individual enemies randomly different health?

    Yes you can. You set the default value when you create the instance variable, but the individual objects can have individual independent instance variable values (which you can change whenever you want for each individual object seperately).

  • Well, everything is working awesome now but I'm not able to reference the instance variables in text boxes. At least I don't know how anyway. I'm working on a project where I need to visually see the "Health" of the object/enemy. With a global variable I was able to easily reference the value with the "Set Text" action but for whatever reason the instance variables are not able to be called the easy way. How do I make the instance values show up in the text boxes ?

    You need to "pick" the objects which instance variable you want to display first. If you just do a set text how should it know which value to display if all your instances have different values

    There are a lot of post on picking in the "How do i FAQ" (sticky at the top of this forum)

    You pick and instance and then use the instance variable.

    If you want to display text or a hp bar for each individual object you can do something like this:

    https://www.scirra.com/forum/viewtopic.php?f=147&t=97297&p=743346&hilit=individual+health+bar#p743346

  • As i expected, and wrote in my post

    You need to fix your collision polygon:

    Edit your image and select the collision polygon editor in the bottom of the menu on the left.

    Then move the red corners to match your tiles outline better (you can add more delete corners etc)

    You need to make it look like this:

    That should do the trick

  • zenox98 yes i was

    sry for not making that clear.

  • there is a lot of info in the manual entry https://www.scirra.com/manual/120/webstorage

    And there is also a tutorial explaining the topic:

    https://www.scirra.com/tutorials/266/webstorage-how-to-save-ingame-information

  • You could create a global variable to store time in. In your event sheet count it up every second, and reset the global variable when you switch to a new layout.

  • Could you provide a capx. or make a new small capx that illustrates your problem, then it could be easier for us to debug.

    Have you made sure your collision polygon follows the edge of the slope as you would expect?

  • check out the physics slingshot example. Its really well explained, and you can just change the graphics to your archery setup.