lennaert's Recent Forum Activity

    Felt like C2 in browser to me.

    ditto

  • you took your time answering post comments? Was you searching for Ashley to back you up

    Nope, I was enjoying life instead of pretending to know and understand things like yourself, on a forum where you think portraying yourself as such is important

    ... shiva would be proud of you, hehehe

  • lennaert someone else is pointing out what I was saying. I seen more christmas then you had since you had your nappy changed lennaert

    Great that you compare christmas and nappies with computer science knowledge ...

    Everyone llkely has a super computer and is interrested in the childish stuff you post. rofl

    I have likely forgotten more about computer science and programming then you have ever understood on the subject .....

  • > You are likely getting an error in your networking overview stating you are not allowed to use that resource.

    >

    > Please add the following line to the top of your PHP page and try again:

    >

    > header('Access-Control-Allow-Origin: *');

    >

    Sorry for question on old post, but what does this do exactly?

    Or more simply

    Should it be used in all php scripts/pages in association with Construct?

    I am troubleshooting an issue with an AJAX POST from Construct. I added this and it didn't solve the issue so don't know whether it's safe to leave in or may cause more issues.

    Brief answer is fine as if I want the nitty gritty I assume I can read here https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS

    That piece of code allows posting methods (also ajax posts/gets) from a different domain then where the php page itself resides.

  • NaN means "Not a Number".

    Where do you get this message ?

    From the events in the picture the most likely position to get this message from is setting the maxScore to the itemvalue, meaning the itemvalue likely does not exist. If you check the debugger, the global variable maxScore probably displays NaN as value, which you then display in the text box.

  • Nice, thanks for the insight

  • lennaert thank you. In your case the solution was to make a manual timer with a new variable

    But it still has an issue - it turns too early. It should turn when it starts walking in the other direction, not when it stops.

    Your welcome blurymind

    The turning should be easily to manipulate, it just a matter of re-positioning sub-event 8 & 9 and adding a extra check on the timeout-wait check to prevent continues flipping.

    something like this

    Also, I left the for each above it, while it is not needed in most cases, it clarifies a lot (readability) when you look at it from a programmers perspective. (especially one relatively new to construct 2)

    Plus, you can move several events below it as sub-events and use the plus sign to open and close a range of events belonging to that loop. Ofc you could use a group too but ,meh, this was easy and for hand

    In the end it will generally not matter if you added it or not, as the construct 2 engine will generally create the same javascript result out of the event sheet in this case.

  • Sorry, totally missed you wanted them to wait, here's another example

  • Sisyphus

    Yep, i am guessing the whole missed actions is a bit of a myth which finds it's origin in incorrect expectations.

    lennaert Your examples are poor. There is no reason a Wait 0 is needed in your function example, and the reason Wait 0 doesn't work in this example is because the Trigger once, which is an abuse of Trigger once, will prevent x=2 from being evaluated. The X=2 condition would nee to be a subevent of x=1 to work with Wait.

    Wait 0 is rarely required.

    That depends on whats in the function meh, blackhornet.

    But you are right, the examples might seem poor to a more advanced developer as they would not need it nor require it.

    But there are quite a few here which do not understand the use and mis-use it....

    The trigger once execution was actually a very good example in demonstrating the working of wait(0) .... whether it is useful or not was not really the point.

  • Ohw you should add the collision detection in the event with the for each loop

    event

    on collision

    for each enemies

    state = "patrooling"

    sub events

    etc

    and

    for each enemies

    state = "waiting"

    sub events

    etc

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • webgovernor

    *nudge*

    UPDATE: I realised that this is because of me using the play at object action...

lennaert's avatar

lennaert

Early Adopter

Member since 8 Oct, 2013

Twitter
lennaert has 13 followers

Connect with lennaert

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • x5
    Popular Game One of your games has over 1,000 players
  • Famous Game One of your games has over 10,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • RTFM Read the fabulous manual
  • x2
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

25/44
How to earn trophies