AllanR's Recent Forum Activity

  • Round((Val1+Val2+Val3+Val4+Val5)/5*100)/100

  • the demo was very good! although there is a minor bug - it let use a golden key when I only had a silver key in my inventory. (it was when I unlocked the door to the room that leads to the guy that wants food.

  • You are setting the volume before you play the music. When you start the music it is resetting the volume (to 1 dB).

    rather than do it in two actions you could do it in one:

    Audio - play MainTheme looping at volume MusicBar.Value dB (tag 'music')

  • the normal way to handle this is to put the player in a family. then check for when the player collides with the family. The player object will be the one that caused the collision and the family object will be the one collided with.

  • I looked at this earlier too, and I think you don't need the "For each xy element" loop.

    you know the id from loopindex("x"), so you can directly set the text and animation without searching through the whole array looking for it. Since the objects were just created, they will be the only ones picked.

    so, get rid of the loop and use loopindex("x") instead of Array.CurX, and use 1 instead of Array.CurY (or whatever y element the data you want is in - I can't really tell from the image).

  • did you turn off default controls in the Platform behaviour properties?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • for question 1, arrays and dictionaries are global by default, so you can access them from any layout.

    I don't understand question 2. When I said you were loading them twice I meant you were reading them from local storage twice - once with the "Check if item exists", and then again with the "Get item" action.

  • Lionz is correct, you shouldn't have to load/save between layouts...

    the reason you are having trouble is that the AJAX loads are only happening if the local storage item is missing. That is why it works one time after clearing local storage. Right after that the item is missing so it executes the AJAX code. Once the inventory is saved to local storage it is no longer missing, so then the AJAX call does not get made, and the AJAXLoading_1 variable will not get set.

    Also, you do not need to do a Get Item after a Check item exists action. If the item exists then the LocalStorage.ItemValue is already set with the stored value, so there is no need to then issue the Get item action. The way you are doing it will work but has to load the item twice for each array.

  • you can also create a css file and load it at the start of your project. Then you can use the exact css code from other sources. Although css code only works on form controls, not other construct objects like the text object.

    see the sample below for how I load css.

    https://www.rieperts.com/games/forum/textinput_css.c3p

  • here is a sample I was playing with last week that sets units animation based on the moving angle.

    you select units with the left mouse button, and send them to a location with the right mouse button.

    I borrowed the player unit from the Demonoire game demo...

    in another sample I am still working on I use pathfinding to choose a path for the units, but then I use MoveTo to get the units there. Pathfinding only takes units close to the destination. If you want units to got to an exact spot you have to use MoveTo, add waypoints found with pathfinding, and then set the final waypoint to the spot you want the unit to arrive at.

    https://www.rieperts.com/games/forum/SelectUnits.c3p

  • You do not have permission to view this post

  • just for fun, I made a quick mock-up with an animated chart. The lines aren't very smooth because there aren't very many data points. The Drawing Canvas object doesn't let you do filled polygons that self-intersect so I changed the filled area on the chart to something it could draw without a lot of extra work.

    https://www.rieperts.com/games/forum/ChartUI.c3p

AllanR's avatar

AllanR

Member since 21 Nov, 2013

Twitter
AllanR has 23 followers

Trophy Case

  • 10-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
  • Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

19/44
How to earn trophies