lionz's Forum Posts

  • 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

  • You've only shown us a destroy action on start of layout, I don't see how it could be destroyed later on when it starts to move.

  • The issue is unlikely to be with converting to a string because it's already a string. I would debug this by first trying it without removing and inserting rows every X seconds, a basic insert a value and see if the player changes animation. If that doesn't work then you probably have other events that overrule the setting of the player animation. If it does work with the above then likely the problem is when you pop the array and set the animation in the same tick then maybe the rows move so the animation is at row 8 instead. Think about adding the logic you have there into one event or function to minimize bugs.

  • Deleting from the array isn't going to do anything now as you are picking from the probability table. You can remove the entry from the probability table but again start simple with a trigger once to make sure it is working then add the repeating functionality afterwards.

    Also you need to repeat from within the function eventually not outside it as you are creating the probability table and adding to it inside the function, or else each repeat will start a new table which means you can end up with repeated selections.

    Logic could be something like : -

    build probability table

    repeat 3 times :

    set variable to arandom.weighted

    create object 'variable'

    remove variable from prob table

  • The weight in the table is meant to be a number but you're adding a character like B or C. The weight is there as a way to define how rare something is to be picked, if it's even for all planets then you can set it to 1. That might be the cause of the output 0.

  • Yes that should work, did you try it?

  • All I can think of is you can scale the player character bigger so it looks like they are moving closer to the camera. Any changes to the camera itself with layout scale I think would just look like a moving camera and not really give an effect of walking up stairs.

  • Do sprites normally walk up stairs realistically in a top down game? What do you mean?

  • A probability table is automatically random so it will pick a random element from it when you use for example Create Object by Name : AdvancedRandom.Weighted. If you want to use this it depends on the design of the game and what you are trying to achieve with the spawning of these objects.

  • For that particular issue also check that the array is loaded before you run the functions, it can all happen fast and we can't see the event where you load the file into the array.

    edit : this is more likely the issue because I see you run the functions 'on start of layout' and the table is only showing 0,0. Try moving the functions to a mouse click that can occur after the array is filled.

  • That logic isn't going to work because in one instance you use 0,loopindex then you use loopindex,0. I would start small and try and pick out the array elements first so you know it is logging the right things. An example of the array in debug view would help, not the array file. The rows/columns matter here, I think you've imported it in an opposite way to what I usually do where the objects are rows (X) and the stats are columns (Y), and you have it where the objects are columns (Y), you just need to make sure the array.at actions are in the correct format.

  • In Construct we use picking with conditions (on the left of the event sheet). A common one is 'player on collision with box', this will pick only the one the player collides with, for example, and apply actions (on the right of the event sheet) only to that instance of box.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • When you create the family object "SpaceMap" it doesn't automatically know which object, you need to create the specific object by name. You store the name of the object in the array but then try and create the family instead. You can create array.at(loopindex,0) or however the values are stored in the array by row/column.

    Pick last created Family can still be used but may not work in the same tick and loop. It may need to be triggered elsewhere but you can test this.

    The array deletion row you don't need to cycle through the array again as you are already at a row in the array and can delete the current row 'loopindex'. The problem with this however is that rows will move up and some objects will be skipped, to resolve this sometimes you can run reverse through the array from bottom to top.

    I saw you create a probability table but don't use it?