Posts by theclarkmeister

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.

    Ok. In this case of "Pick One of 'Hero'" it is always choosing the same object because you have already scoped the object under the ForEach loop. The condition tries to pick one object from the current list of scoped objects, but there is only one object since it is under a ForEach loop. So basically the Pick one of condition is not doing anything. If you were to use it outside of the ForEach loop, you would see random Hero being picked.

    To change the ordering of the object, use one of the actions within the order submenu of the within the object.

    Sorry I didn't get a chance to reply last night. I got it working. I had to rearrange some of the ordering of my events and replaced the ForEach loop with a standard loop and everything works like it should. I forget that the ForEach loop scopes to each object individually vs the loop, so that was throwing me off. Rookie mistake :). BTW, the tutorials on your website are very helpful. I noticed that you haven't written any in quite some time. Do you plan on writing any more? Thanks again for your help!

    This sounds like this could very well be the case. I am indeed using foreach loops and storing values. In a nutshell, I'm: (1) iterating through each hero with a foreach loop and storing their HP inside of a global variable; (2) Checking whether or not each hero's HP >= to the global variable and updating it accordingly; (3) Looping through each hero to check whether or not the hero's HP is equal to the global variable; (4) Picking one of those heroes as the target. The conditions where I'm using the pick one of object look something like this (I'm at work right now so this is off the top of my head):

    On each "Hero", loop name "HighestHP"
    "Hero" HP = Global Variable
    Pick one of "Hero"

    I'll attach a picture later tonight when I'm at home. I'm unfamiliar with changing the object's ordering at runtime. How would I do that? As always, thanks for your help!

    Thanks again fellas. The zombie example is similar, but slightly different. My game is really more like a board game, so on the enemy's turn, each one takes a turn, moving towards a hero and attacking it. I start with the nearest object iteration, like in the zombie example, checking to see if any of the heroes are reachable. However, after that I scope them down to whichever one has the highest health. It then makes its way over to that particular hero and makes its attack.

    I'm pretty satisfied with the result. The pick one of random object condition continues to confuse me. When both of my heroes share the glory of having the most health, the code manages to select the exact same hero every time. I've tested it several times before deciding to move on and finish other areas of the engine.

    If anyone has an example of the pick one of random object condition in action, I'd greatly appreciate it, since I'm not quite able to figure out how to properly use it.

    Sent from my Nexus 5X using Tapatalk

    Thanks for the advice. I think I've gotten things mostly working. I iterate through all of the players to find those within attacking range. I then iterate through those enemies to seek for the highest HP, and store that player's fixed value in the object id of the enemy. It works, unless multiple heroes gave the same highest health. When that happens, both of them get tagged as potential targets. I assume I can use the pick one of object condition to scope it down to one of them, but it seems to pick the same player every time. Am I misunderstanding the pick one of object condition, or is there a better way?

    Sent from my Nexus 5X using Tapatalk

    All,

    I'm making a basic strategy game for my kids and an working on coding my enemies to select which player to attack. I'd like to set it up so that they attack the closest player that has the most health (this way they don't get too frustrated by dying a lot and giving up). I've figured out how to find the closest hero and highest health independently, but does anyone have any thoughts on how I might go about combining the two? Thanks in advance!

    Sent from my Nexus 5X using Tapatalk

    Full disclaimer: I'm a newer user, coming aboard thanks to the stellar humble bundle. That said, I found this to be a great and informative read! As you said, there are times when code, as it appears, should work but doesn't. Now, instead of banging my head in frustration, I have a clearer understanding of how to change the code so it behaves properly.

    I would love to read more stuff like this. Do you have plans to discuss how Clickteam handles auto pairing, or how scoping might effect auto pairing? This is another topic that, at least to my limited understanding, appears to come with its own quirks (or maybe they are the safe thing and I don't quite understand the difference [emoji2]).

    Thanks again for the informative read, and I look forward to reading anything else you may cook up on your blog in the future!

    Sent from my Nexus 5X using Tapatalk

    Sorry it took me so long to get back to you. Thank you for pointing me in the right direction, but I'm having some problems. I'm using the basic example, which suits my movement needs just fine. However, by adding the line you suggested things get a bit wonky. If the path distance is less than the maximum step distance, then everything works as expected. However, if the enemy is farther away then it starts a diagonal march into infinity. This seems odd because the easy_path_engine values put the OUT_next_x and OUT_next_y at the right spot. The easy_path_node does not appear to be created, though (or it is destroyed so quickly that it isn't visible). Any ideas on what might be going on? Thanks again!

    EDIT: Right after I posted this, I figured it out. I had the event inside of a behavior for my that controls pathfinding. Placing this at the bottom of my main event sheet fixed everything!

    I'm coming back to a project that I was working on awhile ago (had some college courses take over my time). I'm working on a turn based strategy, and am wondering if I can limit enemies to a number of squares based on a die roll. Here's an example:

    Let's say that I have a player that is 7 tiles away from an enemy. On the enemy's turn, he begins to march toward the player, but is limited to a maximum of 5 squares (this is a random number generator by a six sided die). The enemy should either walk up to the square next to the player, or stop when their maximum movement is reached.

    I have the first case working (the enemy walks to the player and stops one square prior to them), but limiting their movement eludes me. Any thoughts on how I might accomplish this? Thanks again for all your help!

    Sent from my Lenovo TAB 2 A10-70L using Tapatalk

    I've got a problem that I hope one of you can help me figure out. I'm working on creating a turn-based strategy game. I have two characters programmed using behaviors for each one. For one character, that is ranged, I'm trying to create an object at (0,0) from a character and send it over to each one of the enemies on the screen. If it collides with them, then the enemy becomes attackable. If it hits an obstacle, the object is destroyed and the enemy is therefore not visible. Everything is working beautifully, except that the range checking object is, for some unknown reason, not getting created. The following problematic for each enemy loop is executed when the attack button is clicked:

    [INDENT]- On Loop "EnemyLocations"
    [INDENT]+Destroy the attack buttons
    +Create Range_Check object at (0,0) from Character
    +Move Range_Check using Linear Ease-In to [X('Enemy'), Y('Enemy')] over 30 event loops <--- This event uses the awesome Easing Object
    [/INDENT][/INDENT]

    If I remove this loop and only utilize the distance between the character and the enemy (Character is less than X distance away from the enemy), then the enemies are tagged as attackable and I am able to proceed. Anyone have any idea as to why the Range_Check object is not creating itself? Thanks for your help and insight!