robit_studios's Recent Forum Activity

  • I created a C3P example if anyone wants to test if for themselves. I'm just trying to determine if this is intended behavior or a bug.

    dropbox.com/s/3ksh1jcubyfkxr6/Sprite.Count.c3p

  • Try <1

    I tried that, but I'm getting the same result.

  • Adding Trigger Once didn't change anything, but I think that's because that event runs multiple times as it's going through the array to build the level.

    As another test I added an instance variable to the Enemy that sets it = to the current Enemy.Count right after it is spawned:

    And checking them in the bebugger, they are setting the Count correctly:

    And lastly I made a static variable that hold the current Enemy.Count and then tests that variable as a condition. And that actually works as intended. Now I'm only getting 1 enemy spawning.

    So, how can it be setting the Enemy.Count correctly when setting a variable but then not when used as a Condition? Is this a bug?

  • This is a piece of of my level building code that spawns enemies. For testing purposes I wanted to limit it to only create 1 enemy. So I made a new condition: Enemy.Count = 0, as seen below.

    BUT, regardless if that condition is there, it still creates multiple enemies. Shouldn't that condition always stop spawning enemies after 1 has been created?

    Tagged:

  • I noticed when using the 8-Direction Behavior that VectorX becomes a non-zero value when the player is moving ONLY Up or Down AND VectorY reaches its maximum speed. It also happens when moving only left but NOT when the player is moving to the right. In that case the VectorY always remains at 0.

    I made an example C3P file: https://www.dropbox.com/s/kps3wxhy0r9nl0r/8dirmove_TEST.c3p?dl=0

    I'm using r234.2

    It looks like a bug, but maybe I'm missing something.

  • All these objects skip the intermediate values and only show the final result, oddly except for the listbox, which tries to show all values. And it takes a long time for it to iterate through all values.

    This does make more sense based on what I'm seeing. Thanks!

    That actually makes me really happy because that means the level-generation loop in my game is actually finishing WAY faster than it appears since I'm using a list object to report on its results.

  • I was doing some experimenting with creating a loading bar during a For/Loop and discovered some strange behavior with the List Object and I'm not sure if it's intended or not.

    Firstly, I discovered that during a For/Loop the entire game pauses and waits for that loop to finish before calling any more events or updating the image...

    EXCEPT for the List Object which can be updated during a For/Loop to show the current LoopIndex. I also noticed that using a List Object this way allows other things that normally would wait until after a For/Loop to finish (like animations, or rotating objects) will continue normally DURING the For/Loop.

    I made two C3P files to show what I'm talking about.

    This one contains a List Object: dropbox.com/s/pxo42r7helf0642/Loop%20Test.c3p

    This one doesn't: dropbox.com/s/zdxhbi84rrpn5np/Loop%20Test%202.c3p

    It also seems like updating the List Object takes a lot more time than most UI objects as the loop moves MUCH faster when it's not in the code.

    Interested to see if anyone has any thoughts on this.

    Tagged:

  • I was able to solve my problem through trial and error.

    By using the the AJAX Request URL action and calling the project filename as the URL worked.

    -> AJAX: Request URL "level_data_1.JSON" (tag "LevelDataArray")

  • Is "Snap to Grid" turned on in your layout properties? Sounds like that might be the problem.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Changing the layout angle automatically changes the angle of every layer. Buy you can also rotate the layer angles as well. So if you want one of the layers to not rotate you have to offset that layer's angle by opposite of the layout angle.

    So for example, if the layout has rotated 30 degrees you want to set your HUD angle -30 degree to get it back to 0.

  • I tried making a quick example file to see if I could recreate your problem. I think, if I understand correctly, you just need to set the HUD layer angle like this:

    -> System: Set layer "HUD" angle to LayoutAngle×-1 degrees

    Here is a copy of my example file: dropbox.com/s/qm31mw43zl45b92/angle_test.c3p

    Does this help?

  • Thanks for the help, but, I'm not sure how to put JSON files (that are already 3D arrays) into an array. Sorry, I'm just not sure what you mean.

    I'm also not sure what you mean by "slow asynchronous loop". I tried searching the forums for the term but I didn't find anything.

robit_studios's avatar

robit_studios

Early Adopter

Member since 17 Jan, 2012

Twitter
robit_studios has 1 followers

Connect with robit_studios

Trophy Case

  • 12-Year Club
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

15/44
How to earn trophies