Making turrets

M4573R

New Member
Reaction score
1
So I'm wondering how to get a unit to build stuff correctly, and how to make the buildings turn. I want a hero that can build "turrets". I had to give my hero Repair to be able to let him build. And the building doesn't face enemies. Can I fix this by just making him build a unit with no movement speed?

Thanks
 

X-maul

AKA: Demtrod
Reaction score
201
a building cant turn, the only way to make it turn is to create a new model that got the animation, like the cannon tower...
 

M4573R

New Member
Reaction score
1
I totally just got a building to turn. I gave it a turning speed and 1 base movement speed.
 

M4573R

New Member
Reaction score
1
But it can move now... lol. Maybe I have to give it a self-affecting skill to reduce its speed back to 0.

And how do I get a hero to build buildings?
 

WolfieeifloW

WEHZ Helper
Reaction score
372
Give the Hero the "Build" skill?
And, can't you just give the building 0 movement speed and leave the turning speed?
 

M4573R

New Member
Reaction score
1
It requires a movement speed to turn. The build skill doesn't work. The default peasants don't even have the build skill. I can only get the hero to build stuff if he has repair, and the building takes 0 repair cost.
 

WolfieeifloW

WEHZ Helper
Reaction score
372
Huh?
Peasants have build...
And you could try giving an aura to the buildings with 99999 range that reduces movement speed?
You may have to trigger it.
 

M4573R

New Member
Reaction score
1
In my world editor, peasants have: Harvest, Call to Arms, and Repair.

I'd like my hero to be able to build things like human peasants, but I don't want them to all be able to repair.
 

WolfieeifloW

WEHZ Helper
Reaction score
372
Peasant's gain Build in-game.
Hmm...
Maybe you should try giving your Hero a spellbook that has buildings inside of it?
 

M4573R

New Member
Reaction score
1
So more about this rotating. I don't want the buildings to be able to be ordered to move. This makes it so they can't attack if you order them to move. You can't remove the "Move" ability with triggers. I tried putting in a special movement speed value of -1, which kept them from moving, but the turret will still stop attacking because its trying to be moved.

Any other ideas to hack a building to rotate?
 

WolfieeifloW

WEHZ Helper
Reaction score
372
Like X-maul said via replacing the building, or a custom model request is in order?
Or use a scaled Cannon Tower, which has a rotating head.
 

M4573R

New Member
Reaction score
1
But I'm so close! Its just a matter of keeping a movement speed value, but preventing them from moving. Perhaps a dummy ensnare? Maybe triggers to make the building attack move every time it's ordered to move?
 

WolfieeifloW

WEHZ Helper
Reaction score
372
Freehand
Trigger:
  • Turret Stop
    • Events
      • Unit - A unit is Issued an order targeting a point
      • Unit - A unit is Issued an order targeting a unit
    • Conditions
      • ((Ordered unit) unit-type) Equal to <YourTower>
      • (Issued order) Equal to (Order(move))
    • Actions
      • Unit - Order (Triggering unit) to Stop

Something like that.
 

M4573R

New Member
Reaction score
1
Yeah I was thinking that. I tried it, but the unit for some reason still moves. Sometimes it will stop and keep attacking, but otherwise it keep moving. Strange.
 

Shadow14l

New Member
Reaction score
11
Set movement speed to max
Set turn rate to 1 (or however fast)
Set movement type to amphibious
 
P

PegaLeveBrZ

Guest
It can be done in a simple way.

1- Make peasant build the turret
2- Trigger: Event: Unit finishes construction (condition: it is the turret)
3- Action: Replace triggering unit with a UNIT turret (not the building turret), which is supposed to have movespeed 0 and normal turn rate. It will be able to turn and face, just give it a ranged attack and voila!! If you scale the dummy building and unit with the same values, the swap should be unnoticeable.
 

Shadow14l

New Member
Reaction score
11
which is supposed to have movespeed 0 and normal turn rate.

The problem with that is you need a movement speed to turn (even if you have a turn rate) or that's at least what he said. But if he was wrong about that, than your way should work too.

But a non-trigger way to do it:

1. Set movement speed to 500.
2. Set turn rate to 1.
3. Set movement type to amphibious.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top