MindBeams's Recent Forum Activity

  • You do not have permission to view this post

  • I didn't even know it existed until a few weeks ago. I'm going to try to actively engage with it more this next year.

  • This seems like a strange omission, and it has gotten in the way multiple times during my current project. I must assume there's some reason for it, though I don't know what it could be.

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I don't know why such an important feature is so hidden, but I can't find anything. The option on the right-click menu, as seen in this blog post, does not seem to exist anymore. The manual does not appear to contain a page about hierarchies. The properties panel of objects does not contain any options related to hierarchies.

    How do you make a hierarchy? Is it only possible through runtime events now?

    EDIT: It turns that apparently the only way to use hierarchies in the layout is to select multiple objects at once, then click on the object you want the parent to be. Only then will the hierarchies option appear in the right-click menu; I don't believe the blog post linked above made this very clear. Either way, here it is for anyone who needs it in the future.

  • Oh snap, I didn't know that. Thank you! That should simplify things.

  • I have them in the strings because as far as I can tell, Construct requires them for string-typed instance variables. I had never encountered a problem with other mechanics not playing nice with them, so this is striking me as strange.

  • I think I may have stumbled upon a solution, but I'm curious to see your reaction to it.

    As far as I can tell, Calling SetCurrentProbabilityTable was failing because the string I was submitting for the probability table name contained quotation marks... like strings are supposed to. So I passed the string to a variable thing, removed the quotation marks with replace(thing, """", ""), and then passed thing to SetCurrentProbabilityTable. That appears to have fixed the initial issue of setting the current probability table (it no longer goes blank after a few seconds), though I haven't tried doing WeightedByName without setting the current table.

    Does that sound like it should have worked, or did I accidentally find my way to a bad solution?

  • I guess I might as well put this here too.

    After trying to get to the bottom of this for several hours, I discovered that the expression AdvancedRandom.WeightedByName(WildEncounterTiles.Location) returns a value of 0. This is incomprehensible, and I can find no documentation as to why it should be doing this.

  • Maybe something like this?

    1. Make a variable like "TotalObjects".

    2. Run a loop that makes TotalObjects increment by 1 for each existing object.

    3. Run another loop for every object, with another variable like "TemporaryTotalObjects" that is initially equal to TotalObjects.

    4. In this second loop, if TemporaryTotalObjects is more than 30% of TotalObjects, assign it to the value you want 70% of your objects to have. If TemporaryTotalObjects is less than or equal to 30%, give them the other variable.

    5. Decrement TemporaryTotalObjects each time the loop runs.

    So, for example, if you have ten objects:

    TotalObjects = 10

    TemporaryTotalObjects = 10 for Object #1, so its variable is 1.

    TemporaryTotalObjects = 9 for Object #2, so its variable is 1.

    TemporaryTotalObjects = 8 for Object #3, so its variable is 1.

    TemporaryTotalObjects = 7 for Object #4, so its variable is 1.

    TemporaryTotalObjects = 6 for Object #5, so its variable is 1.

    TemporaryTotalObjects = 5 for Object #6, so its variable is 1.

    TemporaryTotalObjects = 4 for Object #7, so its variable is 1.

    TemporaryTotalObjects = 3 for Object #8. TemporaryTotalObjects is now less than or equal to 30% of TotalObjects, so Object #8, #9, and #10 get 2 as their variable.

    I hope that makes sense. That's just off the top of my head.

  • Currently Advanced Random has one defined probability table, "Testing Zone". This corresponds to an instance variable of some other objects in the game. When those objects are selected by a function that seems not to be relevant here, I want the value of that instance variable to make Advanced Random choose the corresponding probability table.

    In other words, when a tile whose variable is "Testing Zone" is selected, the current probability table should be "Testing Zone".

    When the game starts, this works. However, after several seconds, the current probability table becomes blank, and does not regain "Testing Zone" even when the tiles are continually selected.

    Some clarifying points:

    -All of the tiles currently have the value of "Testing Zone", so I know for certain that there isn't any other value getting in the way here.

    -I have a dummy variable, called "thing", also receiving the value from the tiles. By checking this, I have verified that "Testing Zone" is indeed being passed correctly.

    -I found no success at all telling Advanced Random to make WildEncounterTiles.Location the current probability table. Changing that to str(WildEncounterTiles.Location) fixed that, insofar as it works correctly at the beginning and then never again once the probability table gets reset for some reason. EDIT: After further testing, it seems either one leads to the same result, actually.

    The attached screenshot shows what I believe to be the relevant portion of the event sheet. Any help would be very much appreciated!

  • if the images are on different layers, you can lock the layer of the object above with the padlock in the layers menu, doing so the things on that layer can no longer be clicked and you can easily select the ones below

    Is there a solution if they are not on different layers?

  • For example, in order to select an object underneath. I would imagine this function exists in the editor, but I can't find it anywhere.

MindBeams's avatar

MindBeams

Member since 27 Jan, 2023

Twitter
MindBeams has 1 followers

Trophy Case

  • 1-Year Club
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

4/44
How to earn trophies