tjjoris's Recent Forum Activity

  • Thanks a lot for all the informative responses guys, you've all been a great help

    It does indeed look like the object is not getting picked for destruction after its created. Wait 0.0 seems to be a solution, i'm not sure about "pick by UID" but that might be better than forcing the game to wait 1 tick.

    The reason why i'm creating and immediately deleting sprites is kindof complicated to explain, its not actually necessary. It was more for debug purposes as a way to identify if a variable was changing properly. but now that i understand a little better, the problem is not about the functions not running in sequence but sprites not existing immediately after their created.

    Knowing that I am able to easily solve the problem in my code.

    I don't want to bore you with a long explination of what is happening in the actual game, unless you really want me to. But I appreaciate all the information and help from you guys, thanks!

  • I appolagize if this has already been answered if so i will delete this post.

    I have a problem of functions not executing in the order their called. In the manual it says the called function does whats in the function, then returns to the point which the function was called in the actions. Unless i'm misunderstanding something, that's not how things are working for me. Here's a simplified example:

    [attachment=1:33tppxu3][/attachment:33tppxu3]

    what should happen is first a new sprite is created, then all sprites are deleted. What actually happens is all sprites are deleted first, then a new one is created.

    So far one way around it is to pause the code in between functions but that's bad practice, it will slow down the game, and if a function lags and takes longer than the paused time will create further problems.

    [attachment=0:33tppxu3][/attachment:33tppxu3]

    I've thought maybe only using using the return value as a way to test if a function is finished before calling the next function, but that doesn't seem to work either.

    What i'm trying to do on my actual game is more complicated, but i'm pretty sure this example sums up the problems i'm having with not being able to control the sequence in which functions execute.

    Thanks!

  • OK thanks.

  • well those would both work for the simplified example. but their still just running non sequential sub events.

    [edit] yes blackhornet with your example the second sub event is forced to run after the first because its a sub event OF the first, but I want them both to be sub events of the main event. [/edit]

    The reason I'm asking this question is what if I have a really complex operation that takes a few miliseconds to complete? The second sub event might begin before the first one completes. I was using the wait action to symbolize this.

    I really think functions are the way to force sub events to execute in sequence.

  • Sorry if this has already been posted in the forums, I don't mind it being delted.

    I am wondering what is the best way to run sub events in sequence. Such that the second one starts after the first completes. I'm using sub events because they need to contain seperate conditions. This would be similar to using two if statements one after eachother in scripted code.

    For example:

    <img src="http://i.imgur.com/1pUaBsG.png" border="0" />

    What I would want to happen is for the program to check the first sub events conditions (which there are none) then wait 1 second then change the text to "ONE" then immediately after run the second sub event checking its conditions (none here either) and then immediately change the text to "TWO"

    Instead what happens is it changes it to "TWO", then waits 1 second and changes it to "ONE"

    So it seems seperate sub events don't execute in sequence, which is good for most situations, but how do i do that?

    Here is my proposed solution, and I think its the correct one that will allow seperate conditions to run in order.

    <img src="http://i.imgur.com/21YPb2R.png1" border="0" />

    If anyone thinks there is a better way please let me know.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hawt damn did it! the text field was indeed too small. Thanks so much directly pinpointing the problem. I am truly sorry for assuming it may have been a bug.

    Here's a victory screenshot of the program working to celebrate!

    <img src="http://i.imgur.com/dwtuAvM.jpg1" border="0" />

    On another note by brother got his project working, so booyeah! Big shoutout to the whole Construct 2 team for this awesome program!

  • Here's an example of what i'm trying to do, the text field appears completely blank.

    <img src="http://i.imgur.com/e55Q6T3.jpg1" border="0" />

  • I was hoping to learn more about JSON by converting arrays and dictionaries to text using .AsJSON but nothing is happening, the text field seems to be blank.

    Also my brother had an old document that loaded JSON into dictionaries he created early april 2013, its not working at all and he can't seem to fix it. Not sure if this is a bug or we're just going about something wrong.

    Thanks.

tjjoris's avatar

tjjoris

Member since 6 Feb, 2013

None one is following tjjoris yet!

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies