lionz's Forum Posts

  • Depends what you mean by 'task', probably use a global variable

  • Yes like this, better to give the illusion I think because no need to make a huge level that the player moves down. Keep the background very simple and it should all work well.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Is it already there in the side bar ? Means it was added already...

  • I would guess in that kind of game the player doesn't move but the obstacles spawn and move upwards to give the illusion that the player is moving down, and when reaching a certain Y off screen you can destroy them.

    For moving them up I guess bullet should work but it wasn't good for you ? You can also try Move To behaviour to move them to certain location which does the same thing.

  • Create the function yourself with add function on event sheet, and then call it in the same place. For the paramter you add the parameter on the function itself. Instead of using function.param(0) to refer to the parameter it would just be the name of the param appearing as a variable after you create it.

  • So you agree then, it's a Wait. The idea of having multiple on start of layout events seems confusing to me, I've never done that myself.

  • The reason the last one doesn't work is because in C3 you need to wait for the next tick before the created objects become pickable and you have it all in one event. You could try adding a small wait then after this set a variable to true, which then triggers the for each loop if var=true.

  • Move to top or bottom should work as it will always move above or below the other object.

  • The swapping already works. This was tested before the system got more complex.

    However I will take your advice and make a check when something is picked up and run the loop afterwards. I will also try "else" to check if all slots are filled.

    Thanks!

    Oh okay, what isn't working?

  • Take the triggering event of char out of the loop and run the loop one time like you are picking up an item, there's too much happening like the char overlapping the item while the loop is running, should be very simple like char picks up item then you trigger the loop and with the first sub event, where the loop is assigning the item to a slot only.

    To check if all slots are filled you can do if itemslot=none and run the normal pick up item loop only if itemslot.pickedcount > 0, then 'Else' means there are no empty slots you can run a different function, the swapping mechanism though this wasn't mentioned before.

    For swapping item it depends how you want to do it and needs to be designed first on when you would swap and how and which slots are picked.

  • You probably mean Z order which is to move it above or below but on a given layer.

  • This sounds like a common problem where it sets to 1 and in the same tick the next condition becomes true so it sets it back to 0 all in the same click. Add an 'Else' to the second condition and it should fix it.

  • Yes you have the right idea. With a loop, so system for each(ordered), use slot and ordered by ID. Then off this a sub event if slot=empty : set item/fill etc, and also system Stop loop.

  • This is a little confusing only because you have to pick 2 of the same object and apply actions and you need a kind of workaround. For example if object A passed to object B you could say set A inactive and set B active, but because they are the same object and you need to pick both the active and inactive player then the picking is a little more difficult.

    My approach would be ball on collision with player (where player is set to inactive), grab this instance ID so lets say it is player01. Then you set all players to inactive, then you use system pick all players to open them all up to being picked again (this is required as when you did the initial on collision event you narrowed the player to one instance), then finally you pick player where id is 01 and set them to active! This is all in one event done with sub events.

  • Depends on how you are making that player active, you could for example set the player to active on ball collision, 'active' being a variable on the player. Then you have an event for whichever player is active, the controls are enabled, else for the others the controls are disabled. For the AI you could have another variable to mark them as AI or it might be easier to use a second object for this.