facecrime's Recent Forum Activity

  • Hi everyone,

    currently pondering how I would make a player spawn only once in a layout that i want to revisit later on.

    Say you'd have multiple layouts each of which you could spawn in, but being able to go over into any of them with your persistent player object, but then you'd not want to spawn another player, of course.

    So OnStartOfLayout>spawn wouldn't work. Reusing one event sheet with a single onStartOfLayout would still repeat when I switch layout, right?

    Would eg a menu-screen layout allow to goToLayout and do the one-time loading? I wouldnt want to keep the menu sheet active/included when on the map, so what would happen if I fired a goToLayout and a spawnAtPointOnLayout, can that work?

    Is there a smarter way of one-time spawning a player?

  • Great project!

    How much play time do think you'll get out of it? Are you generating missions or do handcraft them?

  • Thanks, dop2000

    The issue I assume being with the removal of the signals? I would assumes it's not gone immediately after being reacted to? Does it persist for longer than one cycle?

    Would love to know more if you have ...

  • Hi everyone,

    2 questions on signals:

    Are signals global or will a signal given under some picked instances only be available to those instances?

    And can I reuse a signal? I feel like my object reacts fine to the signal the first time but very unreliably after that.

  • are you assigning it a target?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • not sure what you're trying to do, but perhaps the 9-patch object is something you might want to look into?

  • Magistross oh, wow. I'm dizzy just looking at that. thanks!

    I'll need a minute to comprehend what you're even doing there, all that nesting!

  • Hi everyone,

    I have two strings, e.g. A = "apples,banana,orange" and B = "love,ignore,hate"

    I want to ask which number the word "banana" is in A and fetch that substring from B (here: "ignore")

    "Find" seems to give me the number of letters at which my substring begins, whereas "tokenAt" would let me fetch the entire substring, if I had its number.

    Can someone help out with the correct expression?

  • Gotcha, thanks for elaborating.

    I like that approach.

    Funny to think how much easier all this could be if C2 had simple editable arrays.

    • you can easily swap data - Dictionary1 load from JSON Dictionary2.AsJSON

    dop2000

    Oh, now wait - I missed that bit earlier.

    Do I get you correctly there, each enemy type could have an instance of the same dictionary via their container, hence the state machine can reference the variables/keys - since its from the same dictionary for everyone.

    I'd load the enemy type's data into it upon spawning, and also swap the data per instance when needed?

    But where would I store and edit the different configurations before loading them into the instances? I would still need an external json file, right?

    Now that would mean rewiring the entire state machine to the dictionary, but it does sound great. If that's what you're saying?

  • dop2000

    And that's the thing, I do have multiple enemy types, all sharing a family, each with a container holding different sets of objects per enemy type.

    I was considering dictionaries, but if i want a centralised way of exchanging the enemy configurations - not a massive switch statement with each variable of each type listed - I'll end up in the same situation, wanting to map dynamical references to enemy variables. Plus I'd have to maintain each enemy type's dictionary individually, to eg keep them in identical.

    thanks for talking through this with me though, appreciate the input!

  • hey dop2000! yeah I was afraid so.

    I have enemies that have a rather large set of instance variables that define their behavior and how they go through a shared state machine. those are things like reaction ranges, fire rates, weapon type, etc, based on their archetype.

    To further make them more flexible i want to exchange the full set of instance variables, to basically swap out their entire behavior, like going from ranged to melee combat.

    The way i go about it so far is by swapping the enemy out for a separate object entirely, same enemy with different variable values. But that creates a huge configuration overhead that i'd like to get rid of.

    So i was hoping to just fetch those value sets from some kind of config table; i was looking into dictionaries, but found them unwieldy to set up and maintain for each archetype and all their variations.

    i now wanted to just use empty enemy objects for data storage, that via family would be easy to get set up and update. but not being able to reference them dynamically kinda breaks the concept.

    I've decided to go with a json table, which is at least somewhat convenient to edit and traverse.

    I'd be happy to hear about other ideas though! (Sorry for the long read ...)

facecrime's avatar

facecrime

Member since 25 Mar, 2014

None one is following facecrime yet!

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies