Help with Editor

Smiric

New Member
Reaction score
0
Hey, i'm very new to the world editor and am trying to make a map, however the units aren't behaving as i would like and i'm not sure how (if its possible) to change how they are acting.

The basic idea for my map was that Undead spawn and attack your town and you have to try and last as long as possible... i wanted to be able to wall off the town (using farms) and place towers behind the walls to attack the incoming units, hence slowing them down/killing them. However when i do this the Undead stand on the other side of the wall and run around, hitting only once in a while... i think this is because they are getting attacked and cannot reach the attacking unit but i'm not too sure.

So far i have tried putting the unit into the 'worker' category and turning 'Can Flee' to off, however for this i needed to change the Undead to attack move (rather than patrol) to the region i wanted them too, and if they got stuck behind other units they would simply stand still - basically creating another problem.

I have also tried lowering their acquisition range however this doesn't seem to have much effect either.
Any help on how to solve this would be greatly appreciated =)
 

N582114

New Member
Reaction score
2
If the towers are attacking and there is an opening where the units can go to to attack the tower, the units will take that path.

I would solve this by making a trigger that runs when the unit is attacked by the tower.

Make the Undead unit attack the closest building to it.
 

Smiric

New Member
Reaction score
0
Thankyou for your advice, i tried to put in a trigger whereby that happens, however the Undead units always temporarily stop what they are doing every time they are hit by the tower, i guess since they are being re-issued an order. Is there anything else you can think of?
 

N582114

New Member
Reaction score
2
It could be an issue with priority. Check the priority values (if any) of the units & buildings.

Because if the units decide to attack the tower instead of the wall right infront of them, then they consider the tower more of a threat than the wall.
 

Smiric

New Member
Reaction score
0
I'd already tried changing the priority values, i'd set the wall to 5 and left the towers as they were (2, and 3 for the cannon tower) i tried reducing all towers to priority 1 with no effect, probably because they are attacking whereas the wall isn't. In light of that i decided to give the wall an attack with little-no damage however this didn't work either as the Undead would just switch which wall they attacked everytime the wall fired (i had 4 walls in a line, blocking the undeads path).
 

Smiric

New Member
Reaction score
0
Thanks for trying =) ... the map works to an extent, just not quite as good as i would like, i don't know if its just because of the in-built AI for the units is telling them 'oh we're getting attacked and can't reach the unit, lets run around randomly for a little while before deciding to attack whats in front of us'

I've tried highering the tower cooldown rate/damage which improves it slightly, as they run around less often.
 

N582114

New Member
Reaction score
2
It is possible.

Take for example Tower Defense maps such as Fortress Survival Alpha and other maps that use walls to block and towers to attack.
 

brodygs9630

TH.net Regular
Reaction score
6
Not sure if this is possible nor if it would work but try making a trigger that makes the towers invulnerable and then when all of the closest building die, make the towers vulnerable. :thup:
 

Smiric

New Member
Reaction score
0
I dled that fortress map n yeh it is possible...i'm obv just a bit inexperienced in comparison to the ppl that created that map =P.

I tried making the towers invulnerable/vulnerable however i couldn't find out how to do it properly so it didn't work...however that gave me a different idea of changing the classification of the towers...

What i've got at the moment is the towers targeted as air units and then a trigger as follows:

Event:
A unit (owned by player12) is attacked
Condition:
Attacking unit equal to structure
Action:
Pick every unit in (units owned by player12) and do actions:
Loop:
If distance between (attacking unit) and (picked unit) less than or equal to190
Then:
pick every unit in (units within 300 of position of attacking unit) and do..
Unit - add classification of able to attack flying units to (picked unit)
wait until (attacking unit) is dead, checking every 3 secs
Unit - remove classification of able to attack flying units from (picked unit)
Else:
Do nothing.

Theres something wrong though...it allows the units to attack the walls and not wander around randomly whilst getting attacked by the towers, however once the walls are destroyed it wont allow them to attack the towers... im not sure if this is because the units default attack does not allow it to fight air or not. =S
 

N582114

New Member
Reaction score
2
Your towers are classified as an air unit while being on the ground? That's madness.

The reason that the monsters can't attack the tower might be because they're not allowed to attack the tower's classification.
 

Smiric

New Member
Reaction score
0
Hehe, well i do like to be different =P.

That's what i thought, but i thought the action 'Unit - Add classification 'able to attack flying units' would sort that out. I also tried adding a ground unit classification to the attacking unit (tower) and also removing the flying unit classification from the tower...but neither of them seemed to work either.
 

N582114

New Member
Reaction score
2
At this point you should make yourself a cheat trigger so you can test out the real problem.

Create the unit that should attack the tower and control it to see why it can't attack it.

If necessary, put the tower as an enemy.
 

Smiric

New Member
Reaction score
0
Cheers for the advice, i did that and found out that the trigger wasn't removing the air classification, nor adding the ground classification, not sure why though.

Do you (or anyone else) know of a trigger to allow a unit to enable both attacks? Because what i could do is make the Undead have a secondary attack which can target air, which is turned on when it gets close enough to the tower. I've had a bit of a look but can't seem to find an action to allow the secondary attack.
 

N582114

New Member
Reaction score
2
There's an option in the Object Editor to choose which attacks the unit has activated.

Combat - Attacks Enabled [None/Attack 1 Only/Attack 2 Only/Both]
 

Smiric

New Member
Reaction score
0
Yeh i know about that...however if i have it activated all the time it will allow the unit to attack the tower regardless...is there a trigger which can enable the secondary attack at some point during gameplay?
 

Smiric

New Member
Reaction score
0
Ah thats quite annoying as that would have solved the problem =P, thankyou all the same, i'll just continue with putting the other triggers in and try and just hope that someone knows how to fix it =)
 

Dave312

Censored for your safe viewing
Reaction score
269
What you can do is make an ability that allows them to attack air. Then you can just give the unit the ability when you want them to attack towers.
 

Smiric

New Member
Reaction score
0
Ah, thats an idea, do you have any suggestions to what ability/what i should do (i've never tried creating a custom ability - i'm a bit of a noob at the editor =P)

I tried using the web ability with strange consequences... it turned out they couldnt cast web on a non-movable target, so i gave the towers the ability to move, and then tried to stop them with a trigger (as moving towers would be weird) however when the web ability was used the tower would move, just as an air unit would move if it is webbed =P... any suggestions?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top