harrio's Recent Forum Activity

  • thank you gents,

    i was afraid i was losing it...lol. i think i'll hold off on answering questions and just stick to reading the forum. i think i was more of a hinderance to arima [or] anyone [else] reading it, than a help...lol.

  • Arima,

    i think i am really losing it...lol. i thought i read an example of a multiple 'or' condition statement, and a multiple 'or' trigger statement in this tutorial...

    http://www.scirra.com/tutorials/292/guide-to-construct-2s-advanced-event-features

    i may need medical help to sort this all out.

  • i think that 'for each' will do what i was trying to avoid...

    -every hour

    -if any or all mail boxes are not empty

    > add 1 to delivered

    basically, if an hour passed and all the mailboxes were filled 'delivered' would equal one, because there had been one delivery for that hour interval. the next hour, if all were empty, 'delivered' still equaled one. the third hour, if only one mailbox was 'not empty' then 'delivered' would then equal two, because there had been two deliveries in three intervals.

    but the for each would make 'delivered' equal ten, if in the first hour, all the mailboxes were 'not empty'.

    was that clear?

  • maybe adding the trigger to each condition instance.

    trigger sys mynumber = 1

    or

    trigger sys mynumber = 2

    etc...

  • well i have thoroughly confused myself now...lol.

    i can't tell, logically, which way is right or wrong. my brain says, if i want to increase a variable by 1, if either or all logic conditions are met than i should be able to. but every time i look at the examples that you all have given, something goes wonky in my head.

    tell me if this example correctly applies;

    -i have ten empty mail boxes.

    -i want to know how many times a day, with hourly intervals, the mail is delivered.

    -so i don't care how much mail is delivered into how many boxes, only that is has been delivered

    -if i set up all my mail boxes in an or condition saying something like

    if mailbox_1-10 is not empty this hour

    • then add 1 to 'delivered'

    with that set up, i want every hour for 'delivered' to be incremented once, if any or all mailboxes have been filled. but i think, it will be incremented by the number of mailboxes which have been filled in one hourly interval.

    does this make sense, or am i making this way harder than it should be?

    i think i am going to shut up now and wait for people far smarter than me to sort this out...lol.

  • Arima nemo Potato

    i believe i see what arima is talking about now, and i think i agree with him. in a normal programming paradigm;

    If right arrow is down

    or

    If D is down

    • set sprite x to sprite.x+1

    should only execute once if either condition is true.

    nemo, your example is slightly inaccurate to what arima is trying to say. your example expresses 'how much' you would get sick from drinking either glass of dirty water, but arima is simply stating this...

    If you drink dirty blue glass water

    or

    If you drink dirty yellow glass water

    • you will get sick

    how much you drink is not important in this logic condition. only whether you will get sick.

    i think arima is saying that the event should only execute once in the event of any or all conditions being true. which is the way it is 'interpreted' in programming logic. if you desire an event to execute with true conditions than you can design the events to do that, but by default...they should not.

    am i correctly understanding you now Arima?

    after answering you the first time, i read ash's explanation of how or works, and he explains that multiple true conditions will execute multiple event assessments.

    substituting and else condition would require double eventing...

    If right arrow is down

    • set sprite x to sprite.x+1

    else

    If D is down

    • set sprite x to sprite.x+1

    which is counter-intuitive to what the purpose of 'or' is for; to enable the user to connect several varied conditions to the firing of one event set, upon the true value of one, or more or even all of the conditions.

    i hope this was clearly explained. i don't want to make arima's point worse, by confusing people about his intent.

    and i apologize arima, for not reading thoroughly enough before trying to answer your post. like i said, i'm no c2 expert...lol. but i do agree with your assertion...now that i actually understand it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • the true power of the internet is beginning to show itself.

    just wait until major musicians start abandoning music labels for self publishing, or even public funded album production. i know i would pay for the next jazzanova album.

    or when content providers ditch cable and production studio's. think of josh whedon crowd sourcing the return of 'firefly' on a paid youtube channel.

    check out http://www.pioneerone.tv/

    this is the tip of the iceberg that sinks the titanically lumbering major market control of monetized creativity.

  • Arima,

    correct me if i'm wrong because i am definitely not a c2 expert...lol, but in your first example, i think the or condition works correctly. you just did not specify all the possible conditions for the outcome.

    what i mean is; you have a condition for if you press d, you have one for if you press the right arrow. so if you press them both together, the condition is doing exactly what you 'told' it to do. it is counting both conditions as true, because you have not given it an action to perform for pressing both. so if you simply add...

    If right arrow is down

    or

    If D is down

    or

    if D and right arrow are both down

    • set sprite x to sprite.x+1

    wouldn't that work correctly?

  • wow, nice find

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post

harrio's avatar

harrio

Member since 24 Feb, 2011

None one is following harrio yet!

Connect with harrio

Trophy Case

  • 13-Year Club

Progress

13/44
How to earn trophies