America Zombie Invasion

HydraRancher

Truth begins in lies
Reaction score
197
I'm making a zombie map and have run into some problems.

1.
[SEMI-SOLVED]
[del]This is very crucial to game play.
melee.png

You may, at first glance, notice a problem. All my units attack at a long range, further than they are supposed to. It's as if they have 200 range not Melee. Also, peasants repair at a longer range. I really need this problem fixed.Also, t[/del]There is a big blank spot in part of the box that says "Melee" in it. I'm wondering what it's doing there.



2.
[SEMI - SOLVED]
[del]
Also quite important and very difficult.
This is a very complex concept to wrap your head around.
Basically there is terrain all over the floor called oil.
I have a building called an Oil Extractor.
If you build an Oil Extractor in 300 range of an oil splooge (terrain) then you get income. Each piece of oil that you gather damages the terrain. After gathering oil from the same spot, let's say, 20 times, the terrain is replaced with dirt. Each spot has to have 20 "hit points". I haven't been able to think of a single possible way of doing this.[/del]

There is a large lagg problem, read below to understand.



3.
[SOLVED]
[del]Not too important but quite annoying.
foundation.png

I gave my foundation -12.50 height (minimum and preset), and in the editor, looks perfect. When I load up WC3 and test it, my foundation has risen above the ground. I've tried making it a flying building and setting it's speed to 1.[/del]




Thanks to all who try to help. +rep will be given out to those who solve/contribute majorly to the problems. ;)
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
1).
the attack range set in the object editor still applies even if the attack type is melee.

2).
use dummy units at the oils position (or destructables)

3).
you cant set the flying hight to negative values because its adjusted to the terrain. (as far as i know)
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
1. Check your units' collision radii. An attack only has to be in range of the outer radius, so if a unit has 200 radius, it can be attacked from 200+range away.

2. What Accname said.

3. I've had success with a building set to Hover movement, 0 speed, Height and Minimum Height both set negative, and Art - Elevation - Sample Points and Art - Elevation - Sample Radius both set to 0.
 

HydraRancher

Truth begins in lies
Reaction score
197
1) Every unit has 16 collision size, all the melee units have 90 range.

2) I don't get it.

3) Thanks weep worked perfectly! Cannot +rep.

EDIT: What about the big blank space?
 

LurkerAspect

Now officially a Super Lurker
Reaction score
118
I have a solution for problem No#2:
I'll post both the triggers I used and the map with all the details on it, so you'll have full understanding :D

I created a dummy unit, and placed one over each tile of "oil" (in this case poison on the attached map). Then, the oil pump finds oil dummies in range and begins to "harvest" them by adding that dummy to another trigger, which damages it and adds gold. When the dummy dies, the two triggers are synchronised that when a dummy dies, the other trigger fires again, and so the process is made seemless.

Trigger A: This trigger picks an oil dummy in range, makes it belong to the owner of the oil mine (so if there are several oil mines on one spot, even belonging to different players, it will still mine properly) and then adds it to a group that damages that oil spot over time and adds gold.
Trigger:
  • Pump Oil
    • Events
      • Time - Every 10.00 seconds of game time
    • Conditions
    • Actions
      • Set Temp_Group = (Units of type Oil Pump)
      • Game - Display to (All players) the text: Trigger Fired
      • Unit Group - Pick every unit in Temp_Group and do (Actions)
        • Loop - Actions
          • Set Temp_Point = (Position of (Picked unit))
          • Set Temp_Group_2 = (Units within 600.00 of Temp_Point matching (((Unit-type of (Matching unit)) Equal to oily) and ((Owner of (Matching unit)) Equal to Neutral Passive)))
          • Custom script: call RemoveLocation(udg_Temp_Point)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Number of units in Temp_Group_2) Greater than 0
            • Then - Actions
              • Set Temp_Unit = (Random unit from Temp_Group_2)
              • Game - Display to (All players) the text: Oily targetted
              • Unit - Change ownership of Temp_Unit to (Owner of (Picked unit)) and Change color
              • Unit Group - Add Temp_Unit to Oily_Group
              • Set Temp_Unit = No unit
            • Else - Actions
              • Unit - Kill (Picked unit)
          • Custom script: call DestroyGroup(udg_Temp_Group_2)
      • Custom script: call DestroyGroup(udg_Temp_Group)


Trigger B: Periodically damages a targetted oil dummy and adds the gold to the owning player
Trigger:
  • Damage Oilys
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
      • (Number of units in Oily_Group) Greater than 0
    • Actions
      • Unit Group - Pick every unit in Oily_Group and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Life of (Picked unit)) Less than or equal to 1.00
            • Then - Actions
              • Set Temp_Point = (Position of (Picked unit))
              • Environment - Change terrain type at Temp_Point to Lordaeron Summer - Rough Dirt using variation -1 in an area of size 1 and shape Circle
              • Custom script: call RemoveLocation(udg_Temp_Point)
              • Unit Group - Remove (Picked unit) from Oily_Group
              • Player - Add 5 to (Owner of (Picked unit)) Current gold
              • Unit - Remove (Picked unit) from the game
            • Else - Actions
              • Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - 1.00)
              • Player - Add 5 to (Owner of (Picked unit)) Current gold


Trigger C: This trigger will pick all oil dummies around a destroyed oil mine and nullify them, so that you won't be mining nothing when it's destroyed. This will however stop other oil pumps in the area from working for a while, so using it is optional.
Trigger:
  • Oil Mine dies
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Oil Pump
    • Actions
      • Set Temp_Point = (Position of (Triggering unit))
      • Set Temp_Group = (Units within 600.00 of Temp_Point matching (((Owner of (Matching unit)) Equal to (Owner of (Triggering unit))) and ((Unit-type of (Matching unit)) Equal to oily)))
      • Custom script: call RemoveLocation(udg_Temp_Point)
      • Unit Group - Pick every unit in Temp_Group and do (Actions)
        • Loop - Actions
          • Unit Group - Remove (Picked unit) from Oily_Group
          • Unit - Change ownership of (Picked unit) to Neutral Passive and Change color
      • Custom script: call DestroyGroup(udg_Temp_Group)


I've also attached the map with these triggers.
 

Attachments

  • Oil Pumpr.w3x
    16.1 KB · Views: 99

HydraRancher

Truth begins in lies
Reaction score
197
You sir, are amazing. I never thought of doing it this way, although massing dummies was my general idea. It's a shame that I have to place so many, it might lagg a bit.

EDIT:

Is there a way I can place the chickens with a trigger?
 

LurkerAspect

Now officially a Super Lurker
Reaction score
118
Chickens xD kekeke

Not that I know of, don't worry so much about massess of oil dummies. If you change their art model to simply ".mdl", then they won't have a model and shouldn't lag as much.

A handy tip when placing the dummies is to use the grid, and placing them on the intersections of the lines on the medium grid, then the dummies are perfectly in the center of the terrain tile.

About your melee problem, I've seen it before, although I can't remember where or how to fix it, but I'll look into it as well.

PS: It's a really cool resource gathering system, mind if I use it in a map as well? :D
 

Seprest

New Member
Reaction score
15
j/w, won't the overhead script only change the ownership of 1 surrounding oily per 10 seconds near each oil pump?
 

LurkerAspect

Now officially a Super Lurker
Reaction score
118
Correct. That's one oily per 10 seconds per oil pump, and if the dummy has 20 hit points and suffers 2 damage per second while giving 10 gold per second, it will ensure a steady flow rate of 600 gold per minute, or 6 oil patches (in this case; the values can be edited)

@HyrdraRancher: I've been thinking, if you're worried about having too many oil dummies, why not have one dummy per 2x2 area of tiles, and increasing the value of each dummy? Also, increasing the size of the terrain replacement to compensate.
 

Seprest

New Member
Reaction score
15
Correct. That's one oily per 10 seconds per oil pump, and if the dummy has 20 hit points and suffers 2 damage per second while giving 10 gold per second, it will ensure a steady flow rate of 600 gold per minute, or 6 oil patches (in this case; the values can be edited)

brilliant
 

HydraRancher

Truth begins in lies
Reaction score
197
Chickens xD kekeke

Not that I know of, don't worry so much about massess of oil dummies. If you change their art model to simply ".mdl", then they won't have a model and shouldn't lag as much.

A handy tip when placing the dummies is to use the grid, and placing them on the intersections of the lines on the medium grid, then the dummies are perfectly in the center of the terrain tile.

About your melee problem, I've seen it before, although I can't remember where or how to fix it, but I'll look into it as well.

PS: It's a really cool resource gathering system, mind if I use it in a map as well? :D

Sure use it as you wish, I don't mind. ;)

I ticked "is a building" so the dummies lock into place so it's easy to place them. For obvious reasons I also had to give them Invulnerable. I am going to make the model .mdl but I need to see where I'm placing them first so I'm keeping it as a chicken. :)

I encountered a funny bugg. Because my cleric's heal was able to target invulnerable units, you could spam clerics and make them heal the chickens. XD I fixed it by changing the targets allowed.


EDIT:

I can't test my map anymore, I'm getting heaps and heaps and heaps of lagg from the dummies, solution?
 

LurkerAspect

Now officially a Super Lurker
Reaction score
118
Like I said, you could try using one dummy per every 4 squares instead of every one, then just increase the dummies' health and in the trigger, set the radius of the generated terrain to 2.

My other suggestion I didn't make because I assumed you knew about it is to add the "locust" ability to the dummies, which makes them invulnerable, untargettable, and unselectable, but only in-game, which is very handy when using dummies!
 

HydraRancher

Truth begins in lies
Reaction score
197
Like I said, you could try using one dummy per every 4 squares instead of every one, then just increase the dummies' health and in the trigger, set the radius of the generated terrain to 2.

My other suggestion I didn't make because I assumed you knew about it is to add the "locust" ability to the dummies, which makes them invulnerable, untargettable, and unselectable, but only in-game, which is very handy when using dummies!

Locust also means that "Units in range" doesn't work. I could do "Pick all units of type oil dummy" and check the range manually.

If I increased the health, then won't it take longer to die? So 1 extractor could be mining in 10 different places.
 

Seprest

New Member
Reaction score
15
I think* he said increase the hp because it would be mining less physical objects
 

Lifee

New Member
Reaction score
46
i can't help you, but i want say the zombie map looking very cool and i will wait the map release to play xD
 
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