lionz's Forum Posts

  • I did this mechanic with a theme park game to build paths, you can just have while mouse button is down, when cursor is over a particular grid square then change it to the texture of the block, or spawn it there depending how your game works. It also depends on how you set up the grid detection and how the original drag and drop works to drop in a block, you basically just duplicate that action as the mouse cursor moves over the centre of other squares in the grid.

  • I tend to use the rex_moveto plugin for something like this, it should accomplish what you want to move 32 pixels to right on a key press. https://c2rexplugins.weebly.com/rex_moveto.html

    As mentioned above your code is fine except you need to define player.x+32 as a variable beforehand as the player.x changes while lerp is running.

  • Moving around solid objects in a top down game is pretty much what the Pathfinding behaviour is for, try that! I guess if you are working in a grid system then you could allocate empty spaces for dropped loot and make sure it's not occupied, pick the nearest unoccupied space to an enemy when they are killed.

  • Well if you have it setup how I described then they will never go for food unless water is fine, is that the kind of priority you are talking about?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If you add a check, if hunger is below 40 and thirst is greater than 40 to the same event then that will mean they only go to get food if thirst is fine.

  • When you create an object by name you are still just creating that object so what you are asking is can you pick that object by its name, or 'reference' it as you worded it in the question and the answer is yes, you can reference objects after they have been created.

    If your menu items are placed in the layout and destroyed on start up then there won't be any jerky loads as they have already been loaded into memory, unless the performance has dropped for other reasons such as large images, particle effects or too many objects being used.

  • Hey guys i'm working on this platformer game where the main char can do a wall jump then air dash left, right, up, or down .I cant figure out a way to implement it properly doing set x and y have the problem of getting stuck in the terrain and x and y vector don't seem to work right either any tips guys?

    Set x and y will probably teleport the player so that wont work. You can use vector x on platform to push it along or physics apply force to x will also work.

    Also if anyone has more knowledge on the x and y vectors id appreciate that because my wall jump seems a bit easy to abuse being able to just scale a single wall. Is there a way to make a timer and have it reset ever time the char lands on another wall other than the one he jumped from ?

    Yes, you can probably apply the timer to the wall. When the player collides with it, start the timer, and then in your wall jump conditions add that wall.timer must = 0 to allow wall jump.

  • You can pick any object after it is created, of course that is possible. If you are destroying the entire menu, why do you need to pick specific objects?

  • He has created variables for experience and assigned them to an array as the object, but you could quite easily just use the player object or in fact any object. There's no need to use families for this as it doesn't reduce any code, it's fine as it is. If you used families then the code would be identical but instead of using the array you would be creating a family instance.

  • That seems fine for picking, you'll have to share your whole capx or something as it'll be impossible to work out, or describe exactly what has gone wrong with a screenshot of the full events.

  • We'll have to see the event sheet to work out where the picking went wrong.

  • Pick object, animation is playing 'Weapons'

  • It's a common problem I see on here as the animation checks get way out of hand, branching off into something like if player is on floor, and is not landing, and is not shooting, is not moving, then play this animation, then it becomes impossible to follow. Better to start with basics for these animations and keep it as simple as possible.

  • Yeah I can imagine where the problems are with the inefficient events. As you get better at Construct you can limit the number of things you are checking against. For this you would put conditions at the start of the player's general movement saying that they are not frozen, then if they are frozen you set idle animation. Unfortunately you are now left with a bug that you'll have to debug and find out the problem. The likely cause is the timer not resetting as expected.

  • Well maybe not disable the whole behaviour but you can restrict movement by setting max speed to 0.