Cameron9990's Forum Posts

  • You do not have permission to view this post

  • No seriously, it said files successfully uploaded, and then it just did... nothing, literally nothing changed. It's the same old version that I wanted to fix no matter how many times I refresh it.

    Tagged:

  • > So yes, I'm going to have to do on each individual card spawn, change some variable, so it's going to be like 500 events.

    Why do you think it will be 500 events? Do you have each card as a separate object? Even then you can combine them into a family and use a single event:

    Cards On Created: Array push back value Cards.ID

    or something like that.

    However, if you are planning to use the array to store cards, then it should be the other way around - you create cards from the array:

    Array For Each X : Create Card; Card set ID to Array.curValue

    And I have now as of 2 minutes ago, with absolutely 0 tutorials or guides, have taught myself how to use the dictionary to do this since your comment about arrays gave me an idea. God I love the ease of use with this engine sometimes.

  • > So yes, I'm going to have to do on each individual card spawn, change some variable, so it's going to be like 500 events.

    Why do you think it will be 500 events? Do you have each card as a separate object? Even then you can combine them into a family and use a single event:

    Cards On Created: Array push back value Cards.ID

    or something like that.

    However, if you are planning to use the array to store cards, then it should be the other way around - you create cards from the array:

    Array For Each X : Create Card; Card set ID to Array.curValue

    ...well like, I'm very clearly asking how to do this as I don't know how. I wasn't sure how to do it to where it would affect the one item it applies to in a family as apposed to having to do it one sprite at a time. Like yeah, I wanna do it to when something in the card family spawns in the pack opening page that one thing will permanently tick up how many copies I own. I was trying to do it via family instance variables then I realized it wouldn't work. That's how I got here.

    (basically I've never used an array so I have no idea what I'm doing and the videos I looked at didn't help either, same goes for a dictionary)

  • > Or more particularly, how do I do an array or dictionary without it being like 500 events long

    Depends on what do you need it for.

    There are plenty of tutorials and official examples in C3, for instance:

    https://editor.construct.net/#open=level-selection

    So yes, I'm going to have to do on each individual card spawn, change some variable, so it's going to be like 500 events.

    Also, love how the clear button in their own example thing doesn't even work.

  • There are a few ways to do this. Most common method is to use an array or a dictionary to store the data about cards.

    You can also set card sprites as Global, then they will be transferred to a new layout. But be very careful not to duplicate them. If you have 10 cards on one layout and 20 cards on another, you can end up with 30 cards!

    Or more particularly, how do I do an array or dictionary without it being like 500 events long?

  • There are a few ways to do this. Most common method is to use an array or a dictionary to store the data about cards.

    You can also set card sprites as Global, then they will be transferred to a new layout. But be very careful not to duplicate them. If you have 10 cards on one layout and 20 cards on another, you can end up with 30 cards!

    I didn't realize that the location would be changed on every layout if I set them to global, so I guess I'll ask if there is any good tutorials on how to do an array or dictionary for this.

  • I'm trying to make a booster pack for a card game. I need to make it to where the game remembers what I pulled. I was trying to have it to where all the objects are in a family that has the instance variable of (Owned), and when one of them spawn they get +1 on that variable... but then I realized that as soon as I go to a different layout the variable goes away as it's a different copy of the sprite. Is there a way to do this easily, or am I going to have to do a ton of Global variables and do a on spawn event for literally every single card in the game to increase that variable by 1?

  • Minimaps are either a pre-rendered scaled sprite or drawn at runtime one pixel at a time.

    Decide the bounds and scale of your minimap, then loop through each pixel setting it to a color corresponding to the tile it represents.

    So what, code in each individual pixel?

  • I mean... that's self explanatory. My game is made out of a tilemap and I want to make a minimap. It's also large scale open world so the minimap would probably have to be zoomed in. Anyone got any advice or know a good tutorial for this kind of thing?

    Tagged:

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