Yttermayn's Recent Forum Activity

  • PKrawczynski Can you explain what the plugin does, exactly? I looked at the docs for it and it didn't really clear anything up for me, at least not in how it could help my situation.

  • Ok, well, I can work around it, it's just clunkier than it would be.

  • rexrainbow Ok, I am intrigued by your plugin. It may be too late to use it for this particular project because my AI as it is is nearly done as far as the overall structure is concerned, just need to polish the states. However, there is another project I might try to use it for. So I ask, since I hope to release and sell my games someday, are there any strings attached to the use of your plugin? If so, what are they?

  • I know that if you use create object with a family object, an object from that family will be randomly chosen. My question is: Is there a way to control that? Like put in a value somewhere to designate a particular family member to be created? I would prefer to do it this way in my procedurally generated world so that the decision can be made dynamically instead of having to specify a particular object in the script itself.

  • rexrainbow Oh, heh. I was wondering how you wrote a plug-in without understanding picking. My AI blocks have to work with am entire family of mobs, with multiple instances of each family member who may be in totally different situations.

    Thus the need to pick particular instances based on the instances circumstances; they won't all be doing the same thing. Not sure if I am answering your question or not.

    If I was to try to use behavior tree arch, it seems to me that I would have to separate the condition portion, which contains the picking, from the action. But maybe that's just me not seeing how to make it work. Anyway, that's why the initial question.

  • rexrainbow Construct 2's event based system depends heavily on what they call "picking". In the structure of Condition->Action, you choose which objects are affected by the Action from within the Condition part of the event. That is called "picking". IE: If you have a bunch of objects that are all instances of the same object, and you only want to affect certain instances, you must "pick" those instances in the Condition part of the event. Say you have a bunch of enemy sprites that are randomly placed on the map, but you don't want any to start on top of the player's base. You could have an event that says in the Condition portion "on creation of enemysprite", (this picks only enemy sprites that were just created), followed by "enemysprite overlapping playerbase", (this picks only enemysprites which are overlapping the player's base, filtered out of the batch who were just created). Then in the Action portion of the event, you could say "enemysprite destroy". Only the enemy sprites which were just created AND who happen to be overlapping the player's base will get destroyed. You can think of the conditions as ways of filtering or weeding out those objects that you don't want the Action to apply to. Only the objects which meet ALL the requirements in the Condition will be acted upon. This is what is meant by "picking".

    Here is the relevant manual section: https://www.scirra.com/manual/75/how-events-work

  • rexrainbow That looks interesting, but how does it handle picking? I have lots of instanced sprites, and picking can be quite tricky.

  • Wastrel Thanks for the reply. I think things may have changed, but I can understand your frustration. It took me awhile to figure out exactly how to get the correct variable from one of several instanced objects. Because I am writing a roguelike where everything is procedurally generated, it's become a necessity to understand the picking system (this is probably where you had trouble also).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • jobel That looks similar, but applied to train systems. I'd prefer to stay in the realm of games. This is the article that explains it better, and in text that is large enough to read http://intrinsicalgorithm.com/IAonAI/2012/11/ai-architectures-a-culinary-guide-gdmag-article/

    Multiple behaviors that are chosen by a single chunk of decision making logic, aka. the "Soft Taco", is what I'm going for. I don't think I will need anything more complicated at this point.

  • I am just dipping my toes now into writing AI for my game's mobs, and after writing several behavior states, have reallized the need for better organization. After reading about AI architectures, it turns out that a solution I was cooking up is already a thing: behavior tree. Has anyone else written some behavior tree AI stuff in C2? Specifically, I'm looking for the best way to implement it in C2's event->action structure.

    Thoughts?

  • blackhornet and nimos100

    Yes, the custom id is a good solution, I don't understand why I didn't think of it before! Thank you! Simple and easy to implement.

  • Say there is a trail of sprites. Your monster comes across the trail and overlaps/collides with one. You want to be able to figure out what the UID of the next (more recent) sprite in the trail is so the monster can move toward that one (following a trail of breadcrumbs, so to speak). We can't use IID, because our trail is also disappearing, oldest instances first, which makes the IID's of the remaining sprites change constantly.

    What's is the best way to solve this?

Yttermayn's avatar

Yttermayn

Member since 3 Feb, 2013

None one is following Yttermayn yet!

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies