Cameron9990's Forum Posts

  • Check that there are no other objects with active ScrollTo behavior. If there is ScrollTo on the player - remove it.

    There is not, it's just very slight motion blur that it doesn't have when my player has move to.

  • On Every Tick: System scroll to (Player.x+100, Player.y)

    You can also use an invisible sprite with ScrollTo behavior, and move it to those coordinates using MoveTo behavior for smoother scrolling effect.

    The issue I keep having is just that the player spright becomes slightly blurry when moving.

  • I need my camera to follow the player at an offset since I have the UI cover the rightmost 4th of the screen, I want the player to be centered to the remaining amount of the screen.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There are few ways to do so depending on how you want it

    You could use the los to detect when the player is close enough in viewing range

    or

    you can give your ai a number variable call it dist then make an every tick and do set dist to distance(player.x,player.y,enemy.x,enemy.y) then just compare the distance

    Or

    Make a If hit boolean then compare player.x to enemy. X then simulation control you could use timers to let them know how long to runaway for

    Me realizing I forgot to mention it's 8 direction movement with the enemies being solid so they can't run through the player. Like if it were a platformer this would be easy, it's just the fact that it's 8 directions so I can't just say an X value or they'll have times where they're just trying to push into the player when they're supposed to be running away.

  • You will need to have a list of actions for your enemy then apply the value to variable:

    0: run to player

    1: hit player

    2: run away

    If the variable = a number action, proceed enemy to do that action.

    That... didn't answer the question on how to do #2

  • In my game I want one of my enemies run upto a player, hit them, then run off, then run back and hit them again and repeat. How would I go about that?

    Tagged:

  • I'm trying to have an enemy that runs at you, then when they hit you they back away then come back. So it can be them moving away from the player as apposed to there being a force applied to them, that works too, I just need them to back off.

    Tagged:

  • Some workaround that might work for your case: construct.net/en/forum/construct-3/how-do-i-8/retreating-ai-173846

    ...I mean, you saw my code. I just have that but with more extra bits. Also for some reason with the pathfind to the player, they just stop moving, that's why I'm using move to, to move them along the path.

  • I'm having an issue trying to make a decent AI, I'm trying to use pathfinding which is neat, but for some reason every time they move through the path, they're for some reason able to... partially move through walls... like not completely, most I've seen is half their body. I've been trying everything, the walls are a tilemap that has collisions and the enemies themselves are set to be solid. Here's a screenshot of my code, I'd appreciate the help.

    Tagged:

  • A variable and local storage at least required:

    https://www.construct.net/en/forum/construct-2/how-do-i-18/save-global-variable-170111#forumPost1070603

    So wait, I have to save each and every value individually, there is no way to just save the whole project?

  • Like a Mobile app, generally whenever you close the app, all of your data auto saves, how would I go about that?

    Tagged:

  • I was speedrunning a game when I notices a category that required you to get all crystals in the game, I pointed out to the mod that we can't really tell what all of them would be because some are off screen and there could be an infinite number. However I do still want this to be a category. I know the game was made in construct so I'm really hoping there's a way to import the game into construct and just take a look at the maps real quick to find them all, is there a way to do that?

    Tagged:

  • You are right, I never noticed that there are 3 kings of clubs. It's because the deck size is 52 cards, not 54.

    > also a bunch of 1 of cards is a lot different than some cards being played at 4, some being at 3, some being at 2, some at 1.

    Sorry, I don't understand what you mean by this.

    Well it's a trading card game. Like in Yu-Gi-Oh! you're not playing a set list of 1 of cards, you're playing a bunch of cards that are different from your opponent to build a deck, you can run upto 3 of any 1 card in your deck (given it's not on the ban list) but you're not always playing 3 of everything, you might only play 2 or 1 of some cards. It's different than making every card in the game be in the deck and being at 1.

  • Check out this demo, it's quite old but may give you some ideas:

    https://howtoconstructdemos.com/template-for-a-card-game-shuffling-a-deck-of-cards-dealing-cards-to-two-players/

    I still don't think this helps, like I'm sure he didn't intend on there being 3 king of clubs, there just is, also a bunch of 1 of cards is a lot different than some cards being played at 4, some being at 3, some being at 2, some at 1. Like the load of variety that there is.

  • So you have one instance of the object Deck with many instance variables in it representing cards?

    Why not create many instances of Card object? It will be much easier to work with them, even if you don't need to display cards on the screen. You can add variables like isDrawn, isPlaying, cardValue and so on, pick cards, count them, filter, destroy etc.

    Well yeah, I have many cards too. I just don't know how to do the whole random drawing from a deck list. Like I don't think there is a way to add or remove from families in game so it's not like I could just do a random from the family named "Deck" then remove it from the family when it's variable for the number of copies I'm playing hits 0. (I'm also just a bit tired rn so I could be thinking about this all wrong)