• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Creep spawn problem

Status
Not open for further replies.
Level 3
Joined
Nov 7, 2006
Messages
36
I got a small problem, its about a creep respawn.
It looks like this:

Events: Unit - A unit Dies
Conditions: (Owner of (triggering unit)) Equal to Neutral Hostile
Actions: Wait 300.00 seconds
Unit - Create 1 (Unit-type of (Triggering unit)) for Neutral hostile at (position of (Triggering unit)) facing Defualt bulding facing degrees

The problem is that the creeps dont respawn, but if i remove the "wait action" it works!

Can someone tell me what I should do to make it work?
 
Level 8
Joined
Feb 20, 2007
Messages
338
I noted that in earlier work as well. What I did was increase the lifespan of corpses/bones.

I'm uncertain if the computer wipes out the point of a corpse after the corpse decays to zero or not, I assume that this is the case.

What I use is something like this:
  • Creep Respaen
    • Events
      • Unit - A unit owned by Neutral Hostile Dies
    • Conditions
    • Actions
      • Wait 60.00 seconds
      • If ((Number of units in (Units within 250.00 of (Center of (Rect centered at (Position of (Dying unit)) with size (20.00, 20.00))) matching (((Matching unit) belongs to an enemy of Neutral Extra) Equal to True))) Equal to 0) then do (Unit - Replace (Dying unit) with a (Random level ((Hero level of (Triggering unit)) + (Random integer number between 1 and 10)) creep unit-type) using The new unit's max life and mana) else do (Do nothing)
      • Point - Remove (Position of (Dying unit))
      • Point - Remove (Position of (Last replaced unit))
The point commands are a product of World Editor Unlimited. Points as you may know create lag if they are not removed. The more points the more lag. There are other methods to remove points discussed elsewhere.

The If ((Number.... command (it is one line in the editor) gives a lot more functionaly. 'The Units within 250 (center of...' part prevents a respawn of creeps around heroes and built units. I used a random unit 1-10 in this instance you can do it with a matching unit.

Note the delay is 60 seconds. I am using pretty much a default 'Gameplay Constants' (Menu/Advanced/Gamplay constants) where the decay of bodies/bones can be set. Default is 88 seconds for bones, 30 seconds for structures.

I bet if you reduced your wait to 87 you will find that it suddenly works.
 
Status
Not open for further replies.
Top