Repairing a barrier

ZachQuint

New Member
Reaction score
0
im makin a zombie game, and i need a way to repair barriers while they are being attacked or have been destroyed please help
 

Sajin

User title under construction.
Reaction score
56
make an ability of channel called repair that is a channel skill for 999 seconds
trigger 1
Unit begins channeling

ability = repair

set repair_unit[player number of owner of triggering unit] = target of ability being cast
if unit = barrier then set cutsom value of repair_unit[player number of owner of triggering unit] to 1 else do nothing

trigger 2
Unit stops channeling an ability

ability = to repair

set cutsom value of repair_unit[player number of owner of triggering unit] to 0

trigger 3
every 1 seconds

-none-

Pick all units = to barrier in playable map area
if picked unit custom value = 1 then add 10 health to picked unit




this is all just thrown together so idk if it will work exactly right
 

ZachQuint

New Member
Reaction score
0
the repair is instant, sorry for not mentioning this, and you step in a region to repair. sorry!
 

linamus

I r bak!
Reaction score
57
In that case, this should work:

Code:
Events
        Unit - A unit enters Your Region
    Conditions
        (Unit-type of (Triggering unit)) Equal to Repair bot
    Actions
        Destructible - Pick every destructible in gr3 <gen> and do (Actions)
            Loop - Actions
                Destructible - Set life of (Picked destructible) to 100.00%


if it's unit, replace destuctible with unit
 

ZachQuint

New Member
Reaction score
0
I fixed the repair problem, the zombies will attack the barrier break through and attack the survivor. however after repairing the zombies will sit outside the barrier and not attempt to break through.
how can i fix this?
 

Azlier

Old World Ghost
Reaction score
461
Zombies in general are notorious for their ability to totally ignore and then attempt to walk through any obstacle between them and tasty human flesh. Give the barricades a very weak ranged attack that does 0 or 1 damage. It shouldn't affect the outcome of any battles, but it will provoke the zombies and cause them to try and tear it down.

Hopefully.
 
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