vee41's Forum Posts

  • Here is an example that involves handling collisions between two instances of same object:

    Evil sprites demo

  • Add 'Wolf : pick nearest to player x,y' condition below your 'Every tick' condition.

  • I'd do it something like this:

    <img src="https://dl.dropboxusercontent.com/u/19921470/spawnProblem.PNG" border="0" />

    Spawned is a boolean instance variable that starts as false.

  • vee41 but if you're using containers there would be no need for the family. just check the enemy and tell enemy_sprite what animation to play.

    Edit: There would be no need for the family for the animation stuff, you would still need it for other stuff like attacking them.

    EncryptedCow But as he is doing it with families, there is need to use a family here. Player and enemy sprites are separate objects in a family, but would need to use the same animation triggers.

  • Or put the enemy_sprite in a container of enemy. That way it will always know which enemy_sprite to reference. I could be wrong though, I don't use containers too often.

    They would not be picked if you pick the family the object is in.

  • That would be a picking problem. :)

    What you'll need to do is pick the "Character_Sprite" that is related to the "Character". Few of the approaches you could take:

    • Saving UID of the "Character_Sprite" to instance variable of "Character" and using "Pick by UID" action.
    • Picking the "Character_Sprite" nearest to "Character". Might be risky approach, depending on how your game works.
  • Sounds to me that you should be looking into containers and not families.

  • To summarize the intended functionality with an example event:

    If Character family is jumping, set picked object's animation sprite (which I have put in an Animation family) to "Jump". Making this event will currently just make EVERY character sprite play the "Jump" animation, rather than find just the one that belongs to the acting character.

    My instincts would say this should work:

    On Character jumping

    .. Character: set animation to "Jump"

    If all characters are set to Jump animation I think there is a problem with picking.

  • It's a feature I've been missing too in many projects. Would be great to have an efficient solution for recoloring sprites, as it's something I find myself needing on many occasions.

  • Ashley Thank you can you tell me where i can find the new examples because the links are not popping up for me.I swear i been looking quite a bit.

    Just open construct 2 and start a new project, list of templates and examples should pop up.

  • You are using it wrong, you are just setting your variable to 0.

    Here is a tutorial on how to use web storage: scirra.com/tutorials/266/webstorage-how-to-save-ingame-information

    Aand of course web storage manual entry for all the stuff you can do with it: scirra.com/manual/120/webstorage

  • Post your project or screenshot of the events, and go easy on the caps lock :)

  • Use str(your value) to get strings, int(your value) to get integers.

  • Put enemy in 'pick nearest' event instead of player. :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • thanks. still adjusting..

    But... doesn't the condition under the while loop 'break out of the loop'? I thought that is what the condition was for.. to tell it when to stop and move on?

    Because if I want a group of actions to happen a certain # of times, i.e. I want it to run until a variable reaches 0, is there a better way to do that?

    Should I have the group of actions run from a blank event, then have a sub-event after the actions that says 'if ____ , repeat group of actions' 'else ____' ?

    for example, the process I want repeated until global var numScenarios=0 is a group of actions that includes choosing the door, checking if the answer is right, and having something happen if it is correct, and something else happen if it is incorrect. Then I want this to happen all over again with a new scenario.

    My measly mind just cant understand how this would happen over and over again without something like a while loop telling it to keep going UNTIL numScenarios=0....

    I'd do it like this (if I understood what you are aiming for correctly):

    • When player clicks on door(on touched trigger), check if the answer is correct or not. Do necessary actions.
    • If numScenarios =0, go to next scenario. This doesn't need a while loop, just leave condition 'numScenarios= 0' at your events with related actions. When numScenarios = 0, those actions will run.

    You could think it like that there is a constant while loop automatically going through the event sheets and checking what conditions should be triggered. :)