lionz's Forum Posts

  • 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?

  • Telyko what do you need help with? A new post is better as someone is always around to help anyway

  • In general I'm not sure what the design of the game is but it will keep spawning the grains constantly if the variable is 1 so make sure it's the value you expect

  • You do not have permission to view this post

  • Is the behaviour 'run constantly while it is overlapping' or more like an on hit one time behaviour. It sounds like you've used trigger once so instead you can try 'player on collision with instance'. That should work well enough for a one time hit and you can print the instance UID in the action when the collision takes place.

  • Yes nice, exactly this

  • You just need to put it in the same block you had before, then with the action add set variable to 0.