ThereBits's Recent Forum Activity

  • Your approach was correct, but you made a few mistakes. You need to use UIDs, not IID here, because IID is not a unique number. Use "For each" when there is a possibility that an event can pick multiple instances and you need to process each instance differently (say, pick a different target). I also recommend using Timer behavior instead of "Every X seconds".

    Here is the fixed project:

    https://www.dropbox.com/s/00lmkfa9f50grur/RTS_fixed.c3p?dl=0

    thank you, you can't imagine the light you gave to my project, I can now understand more about how instances work here.

    Thank you very much =D

  • Hello!

    I have a clash of clans game, and I'm trying to make units attack buildings and units.

    Only I can't understand how instances work, to detect enemy or nearest building and start attacking as expected.

    I'll say what I want in parts for the translation not to disturb:

    1 - Create unit with touch is right after she looks for the nearest unit to attack (I think I did it right)

    2 - Make the unit attack towards the enemy unit (this is being more complicated for me)

    3 - Soon after eliminating enemy unit move to another nearest unit

    here is the .c3p of what I could do

    https://drive.google.com/file/d/1UeOWLBUTO1VoFG0InekzgFrdFV8gZ8J8/view?usp=sharing

    Tagged:

  • Use the "pick highest/lowest value" expression under the family "Allies" object, select your health variable and choose lowest. This will pick the instance with the lowest health, then add another condition "pick nearest / furthest" expression also under the "Allies" object, this will pick the closest instance. Store this picked instance in a variable of the healer then do pathfinding to it.

    Because of the translation I did here, this was the maximum I understood

    drive.google.com/file/d/1QGZkTTg9axgXT6p7z0nqU0AiQYjTK6T3/view

    Could you help me with more details?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello,

    I have a family called "Allies", in this family there are "Warriors", "Archers", "Healers".

    I wanted to make the "Healers" unit move to the nearest low life unit. How can I do this? I have tried in many ways with no result.

    I'm using pathfinding to move units

    Sorry for the translation, soon I start my English course to correct this =D

    Tagged:

  • I peaked at your code and did a quick run. Based on the point of view being more from the side than above, do you need pathfinding?

    You could use a hidden sprite to detect when they are in range, and move them to appropriate locations, having them battle there.

    You could also probably use a function to handle moving/battling and simply have them continue moving after toward their target, and when they overlap with say a spawnpoint/base, have them perform a different action (aka attack a base).

    Otherwise I would check debug mode and see what's taking the most cpu cycles.

    Also, regarding improving AI, the event -overlapping another object- can trigger a bunch of different options, maybe with a random function to perform a different attack, like something stronger than a basic attack, or using an ability. If you don't prefer random, you could add an instance variable that adds up over time/attacks performed that then executes the other actions you want to add.

    Smarter AI can be anything from extra actions, and performing actions based on state, so for example, low hp, or when another unit dies.

    Thanks for the answer.

    What would you put in place of pathfinding?

    I put pathfinding because of the obstacles that the scenario will have, and also for the units do not stay one on top of the other.

    Now for the functions I do not have much experience with them, I will read the documentation and try to do what I said

    And the AI I wanted to say was: the units meet intelligently - eliminate the enemy - if there is more enemy in their reach, go to it, otherwise continue to the enemy base.

  • Hello, i'm trying to create a battle system where the troops are created from both bases and the purpose of these units and destroy the enemy base, in the middle of the way I want these troops to fight a battle and who win, continue your way to enemy base.

    If you do not understand my translation (I'm using the translator) here's the C3P that explains the best I want to do.

    https://drive.google.com/open?id=1CFkWpoTV8wkqmj6XXulTFLPRi3W643Hj

    In this C3P shows a little of what I want, but it is very heavy even for my pc (I'm developing for mobile phones), another problem is the AI that is not responding well what I want.

    How can I improve performance and AI?

    I appreciate the attention

  • How do I control my character according to the angle of another sprite "Analog"

  • "Create object (by name)" doesn't do any picking. So you need do it yourself before doing actions on your newly created object. Fortunately, a "Pick last created" condition was added to go along "Create object (by name)". Use that in a subevent right under your creation event, and it should work as you wanted.

    Solved my problem, thanks for helping me =D

  • create a loop and repeat 2 times

    create object loopindex = 0 ? "Player"&NomesObjetos : "Enemy"&NomesObjetos on layer background

    set name to loopindex = 0 ? "Name Player" : "Name Enemy"

    Could you put a print of this event if possible?

    I'm not understanding

  • It seems to be beast, but I am not able to put actions on objects created that way.

    I have a family with the variable "Name" and wanted to put values in these variables.

  • If I understand correctly I would just set the array value to “100,200,Player”

    Create object by name of <tokenat(arrayXYZ, 2, “,”)> at location <tokenat(arrayXYZ, 0, “,”)> and <tokenat(arrayXYZ, 1, “,”)>

    Hopefully that makes sense?

    That's exactly what I was looking for!

    I am creating a dialog system with array, and wanted to create specific actions for a single value.

    Ex:

    [0,1,"dialogue|Player|years"]

    Could use X Y Z in the array, only they are already busy.

    Thanks for helping me!

    Translated PT-BR / ENG

  • ThereBits - no, those features have moved over to Spriter 2, for the sake of doing them justice. Spriter 2 is in alpha testing/development at the moment.

    Rable That's pretty odd. No idea why that might be happening. If you don't mind, please send your project to lucid@brashmonkey.com, and I'll take a look.

    Thanks for the quick response.

    I wanted to ask you one more question, who has bought the first version of the spriter will have some discount for the spriter 2? I bought mine by steam.

ThereBits's avatar

ThereBits

Member since 18 May, 2017

None one is following ThereBits yet!

Trophy Case

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

Progress

10/44
How to earn trophies