Replaced Unit won't Attack-Move

Widescreen

Member
Reaction score
0
Hello, I have a wave of minions that as soon at it appears it will Attack-Move to one of two enemy tower lines, but once it reaches the middle it will be replaced by another minion. Everything good so far. My problem is that the replaced minion will stay still once it is converted, this is the code I have which is wrong:

2yyo19j.jpg


(The spirit tower is the Final tower or "Nexus")

I would like for the minions, once they have converted, to attack-move to a random 1 of two enemy lines. the waves consist of 6 minions and the ideal will be for 3 to go to one enemy line and the other 3 to the other(once they are replaced).

Thank you for your time
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,494
Well, splitting 6 minions into 3 and 3 is not "random 1 of ..." :p


For a perfect split, something like this might do:

On Map Init, prepare a point array with the positions of those towers:
Set Towers[1] = Position of pre-placed-tower-1
Set Towers[2] = Position of pre-placed-tower-2

And some integer variable that starts at 1 (I called it CurrentTower below)


The sending them off part could then be:
Unit - Order (Last replaced unit) to ... to Towers[CurrentTower]
Set CurrentTower = 3 - CurrentTower
 

Widescreen

Member
Reaction score
0
I didn't understand can you be more specific, please? The target of the replaced minion are 3 towers (three on one side and 3 on the other) not 1, and there should be something for when the first tower or second and even the last one is destroyed to move on to the next one (if the last one is not destroyed).
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,494
This is the rant post, a helpful reply will follow below:

Oh, really?
THEN WHY THE DAMN CRAP WAS THAT INFO NOT IN POST #1???
Do you really think that anyone would just randomly guess what the problem is?
Are people really that out of sync with reality?
We are not mindreaders here...

Basically, posts #1 and #3 and mutually exclusive... wtf
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,494
Well, that of course changes everything... you should have started there.

This just needs a bit of fine-tuning then.
As in, you need to keep track of what tower is currently the "first" in each line, and adjust as needed.
Then use the splitting system from above as long as there are towers in both lines, and ... as needed if one line is empty.

I have attached a demo-map here.
You can kill towers, and footman, by clicking them, so it's easy to test it out in all variations.
Note: only ever kill the towers in order!
 

Attachments

  • TowerSplit.w3x
    43 KB · Views: 429

Widescreen

Member
Reaction score
0
This is the rant post, a helpful reply will follow below:

Oh, really?
THEN WHY THE DAMN CRAP WAS THAT INFO NOT IN POST #1???
Do you really think that anyone would just randomly guess what the problem is?
Are people really that out of sync with reality?
We are not mindreaders here...

Basically, posts #1 and #3 and mutually exclusive... wtf

Dude! Chill out for the love of sake! I mention that it was a tower line so that means more than 1 tower. Your post was really useful and I am thankful but I can't get them to go to one of the two lines, would you mind giving the code a quick glimpse?
 

Attachments

  • Test3.w3x
    411 KB · Views: 412

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,494
"It doesn't work" is not a very good problem description...

What are we looking at here?
When does the problem show?
How does it show?
Can I make it happen, or do I need to wait for... some magical moment?


What is sort of obvious from a look at the triggers:
- HasTowersUp and friends need to start at true, so either in some init trigger or directly in the variable editor
- UpOrDown should be initialized to 1 and there really needs to be one such variable per trigger, not one for all three
- Splitting Green probably wants to work with ...Right and ...Down rather than ...Up and ...Down



Random notes:
- Summon Roderal costs 125 mana, on a Hero that starts with 105
- Zyla can not be selected
 

Widescreen

Member
Reaction score
0
"It doesn't work" is not a very good problem description...

What are we looking at here?
When does the problem show?
How does it show?
Can I make it happen, or do I need to wait for... some magical moment?


What is sort of obvious from a look at the triggers:
- HasTowersUp and friends need to start at true, so either in some init trigger or directly in the variable editor
- UpOrDown should be initialized to 1 and there really needs to be one such variable per trigger, not one for all three
- Splitting Green probably wants to work with ...Right and ...Down rather than ...Up and ...Down



Random notes:
- Summon Roderal costs 125 mana, on a Hero that starts with 105
- Zyla can not be selected

Thank you very much. Yes, the game is on early stage it has become a problem that the hero will not be selected when first entering and I don't know why, maybe by duplicating the trigger?
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,494
Well, some more looking:
> (Owner of (Entering unit)) Equal to (Random player from (All allies of Player 10 (Light Blue)))

Replace with:
((Triggering unit) belongs to an ally of Player 10 (Light Blue)) Equal to True

Same for the other conditions and teams
 

3ICE

Cool Member
Reaction score
3
I bet "Replace" does not trigger the "unit enters region" event again. That's your problem. Edit: Elaborating: The minions being replaced with enchanted minions in the middle are already inside the region "center" when they are replaced, so technically the new units never entered center - the whole UpOrDown thing never fires. Here's a far simpler solution:
Event - Unit enters center
Condition: Unit type is Minion
Actions:
Replace unit with Enchanted Minion
If UpOrDown
Order unit to attack up
Else
Order unit to attack down

p.s.: I've seen you create "else" actions that Do nothing. Allow me to convince you to not do that: http://www.3ice.hu/blog/do-nothing-is-evil/
 
Last edited:
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    So what it really is me trying to implement some kind of better site navigation not change the whole theme of the site
  • Varine Varine:
    How can you tell the difference between real traffic and indexing or AI generation bots?
  • The Helper The Helper:
    The bots will show up as users online in the forum software but they do not show up in my stats tracking. I am sure there are bots in the stats but the way alot of the bots treat the site do not show up on the stats
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air
  • The Helper The Helper:
    New dessert added to recipes Southern Pecan Praline Cake https://www.thehelper.net/threads/recipe-southern-pecan-praline-cake.193555/
  • The Helper The Helper:
    Another bot invasion 493 members online most of them bots that do not show up on stats
  • Varine Varine:
    I'm looking at a solid 378 guests, but 3 members. Of which two are me and VSNES. The third is unlisted, which makes me think its a ghost.
    +1
  • The Helper The Helper:
    Some members choose invisibility mode
    +1
  • The Helper The Helper:
    I bitch about Xenforo sometimes but it really is full featured you just have to really know what you are doing to get the most out of it.
  • The Helper The Helper:
    It is just not easy to fix styles and customize but it definitely can be done
  • The Helper The Helper:
    I do know this - xenforo dropped the ball by not keeping the vbulletin reputation comments as a feature. The loss of the Reputation comments data when we switched to Xenforo really was the death knell for the site when it came to all the users that left. I know I missed it so much and I got way less interested in the site when that feature was gone and I run the site.
  • Blackveiled Blackveiled:
    People love rep, lol
    +1
  • The Helper The Helper:
    The recipe today is Sloppy Joe Casserole - one of my faves LOL https://www.thehelper.net/threads/sloppy-joe-casserole-with-manwich.193585/

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top