Cameron9990's Forum Posts

  • If you are going to write events like this it's good to get used to debugging and logging. Add the Browser object to log the output and see if it's as expected.

    I normally would use the debug menu... but I can't view local variables in the debug menu.

  • Hi Cameron, This may or may not work but looking at the top of your events I see you have on anim end OR is respin > Set ROdds and Set Respin to False. What might be happening is Construct is seeing this as if Respin is True set it to False right away which will make it always False. Try to add a wait 0.1 seconds right above your Set Respin to False. This should allow the ROdds event to happen before it sets Respin back to False. I am no expert by any means just scrolling through the forums trying to help.

    This did not work, also even if it did I'd be scared of it having the chance of spawning multiple things.

  • No seriously, what am I doing wrong, I feel like this should work to make it all loop until it finds a result but it's simply just not, it's just playing through once and Respin never becomes true.

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You do not have permission to view this post

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