6bf85f30-2578-4227-841b-41a0007077df's Forum Posts

  • Invisible means not visible. It does not mean not interactable.

    Cool. So is there a way to make a layer "not interactable" or do you need to program in lots of collision filters? Not sure why someone would want a layer to be invisible but all of the objects are still interactable.

  • -You can disable collisions on the objects that are on the other layer

    or

    -You can create collisions filters and activate them just when the player wins

    Very good work-around (and I honestly used it in my game) however we shouldn't need more coding to make our game work.

  • I asked a similar question about this as my understanding of this game engine is that when you program a layer to become "invisible", the objects that are clickable should also be "invisible". However frequent testing shows that this isn't the case.

    I really believe this is a bug as it is unwanted/unexpected behavior from the game engine. Somewhere there has to be coding in the game engine that needs to be updated to truly mark the layer as "invisible" including all objects on that layer.

    Just my .02

  • You do not have permission to view this post

  • you want:

    "testing text" & newline & "blah blah"

    If I could buy you a cold or hot one, I would. That made my day. Thanks!!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey all. I searched around and figured it might be quicker to just ask this dumb question.

    When entering in text in a SpriteFont box, is there a way to insert a </br> so that the text will start a new line?

    scripting the box to as:

    "testing text" <br> "blah blah"

    would create:

    testing text

    blah blah

    Thanks as always for your time.

  • I guess my confusion came from seeing HTML having to be used for everything web related years and years ago to more user-friendly approaches like Wordpress (not for all sites, talking easy to use tools).

    I just figured somewhere along the way, there would be an option/check-box, short code, etc that changed the format to include commas in numbers that were greater than 3 digits.

    Again, I appreciate your explanation and will come back to this at some point when it doesn't seem so overly complex. Take care!

  • I'm a bit of a newcomer to game programming so I apologize for the dumb question but is this (adding comma's) a major obstacle with other game engines? It seems like something that should be easy to include in a game engine and not require so much time to put a formatting function in.

  • Hey experts. Going to try to keep from making this a wall of text.

    Have a project with several layers with the “combat” and “crops” layers being the focus here.

    When I’m on the crops layer, the character collides with an object and opens the battle layer (as designed). This collision causes all layers to be invisible and only the combat level is viewable.

    However, when I click on objects on the combat level, somehow my clicking also selects objects on the (invisible) crops layer, causing undesired behavior.

    So, how can I prevent items on the crops layer from being accessible when that layer is hidden and only the battle layer is visible?

    I’ve tried making layers invisible, disable layer “crops” effect, etc with no obvious success.

    Constructive input and suggestions appreciated, thank you in advance.

    Tagged:

  • I don't rly get it. But what you mean is: if space is less then max space -> add item, only if weight is also less then max weight.

    Add item instance vars(weight 10, space 3)

    If item weight+current weight <= max weight AND current space + item space <= max weight

    Pickup item to bag, else don't

    Sometimes you just need another set of eyes to make things clear. Your reply helped a lot and pointed me in the right direction. Testing now and will update shortly.

    Thanks again!

  • Hey experts!

    In this game I’m working on, the character gathers items and stores them. However the items have a value called “weight” and I’m trying to prevent the character from exceeding his max storage value.

    Example: if item has weight of 5 and the storage max is 6, the item can go into storage. However when he picks up another item, he can put it in storage but can’t pick any others up unless he empties storage so there is at least 1 space left.

    I have the system check that the item’s weight variable value is less than the total_storage variable (both global variables). What I need is for the system to check if there is enough room between total weight and the item’s weight.

    (Example)

    Total storage variable = 6

    Item storage value = 5

    Current storage value = 4

    Game should prevent the item going into storage. Not sure how to program that and appreciate your help!

    Tagged:

  • Never mind. Found it myself, thanks anyways.

    ("Loot Stolen=" & (round(Dictionary.Get("SmallWin")*(AvailableMoney)))

  • I tried this but didn't seem to make a difference.

    round(yourvalue*100)/100 will give 2 decimal places.

    The number of 0's is the number of decimal places so round(yourvalue*10000)/10000 would be 4 decimal places. From here: https://www.construct.net/en/forum/construct-2/how-do-i-18/round-float-certain-decimal-80444

  • Hey C3 world.

    Formula I'm testing -> ("Loot Stolen=" & Dictionary.Get("SmallWin")*(AvailableMoney))

    "SmallWin" is a random decimal [0.1,0.3] which multiplies "AvailableMoney" [6000,15000]. The result is xxxx.xxxx but I'm trying to get it to be a whole number.

    How would I go about this?

    Tagged:

  • Follow this

    https://www.construct.net/en/tutorials/create-proper-healthbar-277

    Much appreciated! Checking into it now.