Group condition to another group

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Quote

    Wow, really interesting work Snail.
    I studied it for a while but I don't get what the non-player items can see,
    green square gets its non-seen squares alphaed when hovered,
    is this mechanic also replicated in some way for other square classes?

    This request by Lukiester has a backward history I was aware of:
    Please login to see this link.
    so I guessed the simpler task he was in need of

    I didn't realize he was looking only for enemies seeing the players; I thought he meant objects seeing each other. I know yours is faster when it's all enemies to each player, but I don't know if it'll scale up as well to enemies seeing each other. What mine does is it identifies all objects that each kind sees and hides the ones that they don't see. The green box (the only Neutral one) isn't the player, per se; it's simply another class. Hovering over it will show you what it sees. If you added two of them, hovering over them would show you everything they see shared between them. Hovering over the other classes will do the same.

    I was surprised how much of a performance hit it takes, however, to do it with this method using the lists. Yours is definitely faster.

  • Quote from Lukiester

    i guess it would be because all the other conditions are made for player 1, but still it acts weird

    Yes, you'll have to replicate group dynamics for other conditions too.
    I took a quick look, maybe all mechanic can be also "lightened" a little.

    But I don't get how you would like to combine various game functions,
    in short, the exact enemy behaviour you want:

    1- enemy that has LOS open to player starts chasing player
    2- enemy that loses LOS stops chasing player after a given time
    3- ...and starts chasing "nodes" again? (from nearest one?)

    And what's the "viewfield" object intended for? Isn't it a "duplicate" for the Los?


    Quote from Snail

    What mine does is it identifies all objects that each kind sees and hides the ones that they don't see.

    Thanks Snail, now it's all clear :)
    A really advanced and interesting example worth a in-depth study, thanks for sharing

    a selection of my Fusion examples can be found Please login to see this link.

  • Absolutely. I was initially thinking Lukiestar wanted to do something along the lines of a real-time strategy game with fog of war for the AI. Definitely not the case, however! Still, if someone has a use for this, there it is. :) I'm sure there's a way to optimize it to get it closer to the performance of your example but this was the first method that I thought of.

    Lukiestar, which part are you having trouble with? I'm sure we can still help you out with it if you're stuck on any part of it.

  • basically there is an enemy group and a player group and each one the enemies has a los for each of the players. When the enemies see the players it triggers a 1 second timer that if the enemy can see still the player it means they have been found. If they see them but loose sight before the timer they return and continue with their original movement. If the enemy does see the player for more than one second it will continue to follow the player and then if its has been that second and its then looses sight on will go on a given path. And then it will repeat itself once on the path
    Thanks Lucas, btw the ai activation object is just its field of view so when the player is seen by the line of sight and is within the field of view

    Edited once, last by Lukiester (September 1, 2015 at 9:38 AM).

  • Ok heres something Please login to see this link. i have just made a simpler timer and fired an event when the timer reaches a certain amount. Now im having trouble with the other stuff. For setting their direction to the player, it doesn't work just on an enemy loop it just looks at the same one? Any ideas also for everything above

  • I'm sorry I'm willing to help but I have to find a suitable time-frame :(

    This time the task involves reviewing a good bunch of code and reconstructing a chain of thoughts,
    I hope I will be able to do it next days
    (..if anyone else won't kindly accept the challenge before.. <3)

    a selection of my Fusion examples can be found Please login to see this link.

  • Hey you'll be pleased to hear i figured it all out :) Please login to see this link. here it is its all good apart from when the enemy sees one or more player it screws up, so that's the only thing i have to fix would you know how to do that?

  • Hey, you did a great job and cleaned up the code a lot!

    Ok now it's quicker to inspect X)

    Here's a "chase nearest target" version:
    Please login to see this link.

    Enemies will chase nearest player (added Target Dist value in both enemies)

    Didn't know when to return to node-path chasing, after losing sight and timer delay...
    I see you made them revert to standard path movement after losing sight,
    so I made one enemy return to node-path and one to standard path
    (for reverting to node path just set "found" of enemy to -1)

    a selection of my Fusion examples can be found Please login to see this link.

  • Hey its great but its a bit different to the original return to path and im not quite sure what you did with the -1. Basically when the enemy sees the player it will trigger a timer. If that timer doesn't get to 200 it will return and if it does it will continue to chase and then if the timer has been triggered and it looses sight it will go to the path. Also the first enemy goes straight to the path?

  • First enemy heads to the "base" and then goes toward the node-path.

    So, if I got it right,
    it should instead behave like:

    1- los open: enemy start chasing, timer starts
    2- timer < 200, sight lost (los closed): return to base
    3- timer > 200, sight lost (los closed): return to node-path

    ?

    a selection of my Fusion examples can be found Please login to see this link.

  • Ahhh that makes sense!

    Here's this behaviour coded then:
    Please login to see this link.

    Only problem I can see is enemies getting stuck while returning to base and blocked by walls
    (....add pathfinding...?? :o :O :( )

    a selection of my Fusion examples can be found Please login to see this link.

  • thanks so much it works great, the only thing is that enemy 2 goes to the path at the right time but then when he sees the player and looses sight from that he goes back to the origonal place were he is meant to go on the path. Also i do not have to implement path finding as the nodes will be very close together and there will be a lot of them

  • Mmm on my side it works good,
    both enemies chase players(s) and if losing sight:

    > 200 delay (about 4 sec.) --> go to node
    < 200 delay --> go to base

    You get a different behaviour?
    Always or on random basis?
    Did I miss something?

    Seems like a good idea going with many nodes instead of pathfinding,
    but you would have to do the same also for "return to base" (maybe setting base-object as path-node 0?)
    good luck!

    a selection of my Fusion examples can be found Please login to see this link.

  • Oh sorry both of them do it, basically when the timer has gone off they should never go back to the original and instead go the path every time they loose sight. Also the return to base shouldn't be a problem as i am going to shorten the timer a lot.

  • So the "return to base" should only work until timer remains below 200,
    and then, once timer has gone over 200, never activate the return to base again for that game?

    a selection of my Fusion examples can be found Please login to see this link.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!