vee41's Recent Forum Activity

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

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

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

  • Here is a quick example how system I described could work:

    Spawner example

    It's very basic, but expanding it should not be too hard.

  • You could store the information about what you want to spawn (type, spawn spot and amount) in array. Then have couple of variables (wave, level) that basically index that array. At start of every wave you call a spawn function, which looks at data the array has defined for the wave/level array. Spawn stuff based on values in indexed array positions.

  • RUNDOWN:

    (Note: At the beginning of the game <font color=blue>numScenarios</font> is set to the width of the <font color=red>QA array</font> to keep track of how many questions there are.)

    What I expect to happen:

    The while loop begins, it prints the first scenario, the user has a chance to touch/click which door has the correlating, correct answer - they move along a path to the door they touched, once they arrive to the touch coordinates: if they are right (if the <font color=green>door.doorOption</font>/<font color=orange>doorText.specificDoorText</font> = <font color=magenta>scenario.scenarioAnswer</font>), I take the scenario they got right out of the <font color=red>QA array</font> and subtract one from <font color=blue>numScenarios</font>//if they are wrong, points get added to delay time, the scenario stays in the <font color=red>QA array</font>, and <font color=blue>numScenarios</font> stays the same. This process happens until <font color=blue>numScenarios</font> = 0. Then the game is over and it takes you to the summary page.

    However, I am not sure what part of my while loop is causing the page to get hung up.. and hoping that another pair of eyes can catch it, or suggest another way to go about doing things.

    Thank you all very much. <img src="smileys/smiley1.gif" border="0" align="middle" />

    C2 event sheets are evaluated as whole every tick. So if you have a while loop, you should also break out of it somehow, otherwise the tick will never complete. You don't need 'game loop' as you'd have in traditional programming. :) I don't see any need for the while in there at all. You should adjust your thought process more towards 'trigger based', so think what should happen when player clicks a door, what should happen when a layout starts etc. It will help you a lot in getting best out of construct 2!

  • i hope to see this in construct,i really need something like this for my project.

    Check webgl effects like tint.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've usually made separate icons object with the same frames, makes reading events a bit easier.

  • Correct format would be: "pointpath " & numpoint & ".X". Couldn't really understand from your events what you were trying to achieve there? :)

  • You could do this:

    Every 1 seconds

    lot animation "pub" is playing

    lot Is Visible

    .. add lot.pickedCount to Money

    For each should work too:

    Every 1 seconds

    lot animation "pub" is playing

    lot Is Visible

    For each lot

    .. add 1 to Money

  • It's great engine for what is meant for. You could share those two project files and we could see what is wrong with them. :)

    There is contact section on the site: scirra.com/contact

  • You can do that with WebGL effects, there is tint effect that might fit your purposes well.

vee41's avatar

vee41

Member since 12 Apr, 2012

None one is following vee41 yet!

Trophy Case

  • 12-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

14/44
How to earn trophies