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

This revive creeps system

Status
Not open for further replies.
Level 6
Joined
Jul 21, 2011
Messages
139
could it cause desync? (keep in mind it picks 250 units, adds an integer number and remembers their location)

is there a way to improve it?

thx

  • Prin
    • Acontecimientos
      • Map initialization
    • Condiciones
    • Acciones
      • Set lex = (Units of type Tauren)
      • Grupo de unidad - Pick every unit in lex and do (Actions)
        • Bucle: Acciones
          • Set Integro = (Integro + 1)
          • Unidad - Set the custom value of (Picked unit) to Integro
          • Custom script: set udg_Creep_X[udg_Integro] = GetUnitX(GetEnumUnit())
          • Custom script: set udg_Creep_Y[udg_Integro] = GetUnitY(GetEnumUnit())
      • Custom script: call DestroyGroup(udg_lex)
  • ReviveCreep
    • Acontecimientos
      • Unidad - A unit owned by Neutral hostil Muere
    • Condiciones
      • (Unit-type of (Triggering unit)) Igual a Tauren
    • Acciones
      • Wait 17.00 seconds
      • Set point[1] = (Center of (Entire map))
      • Set point[2] = (point[1] offset by (Creep_X[(Custom value of (Triggering unit))], Creep_Y[(Custom value of (Triggering unit))]))
      • Unidad - Create 1 Tauren for Neutral hostil at point[2] facing Vista edificio predeterminada degrees
      • Unidad - Set the custom value of (Last created unit) to (Custom value of (Triggering unit))
      • Custom script: call RemoveLocation(udg_point[1])
      • Custom script: call RemoveLocation(udg_point[2])
 

Wrda

Spell Reviewer
Level 28
Joined
Nov 18, 2012
Messages
1,994
You don't need to do this:
  • Set point[1] = (Center of (Entire map))
  • Set point[2] = (point[1] offset by (Creep_X[(Custom value of (Triggering unit))], Creep_Y[(Custom value of (Triggering unit))]))
Do this instead:
  • Set pp = (Point(udg_CreepX[(Custom value of (Triggering unit))], (udg_CreepY[Custom value of (Triggering unit))]))
Is this supposed to revive 1 creep or? As your trigger above says, it will only revive 1 type of creep. This doesn't desync
 
Level 6
Joined
Jul 21, 2011
Messages
139
only 1 type of creep forever, you kill an unit after 17 seconds another one will appear in its natural location

so you are using convert cordinates to points right? im unfamiliar with it, are you sure its safe, doesnt leak or bring negative things?
 
Level 6
Joined
Jul 21, 2011
Messages
139
lets say that in my map theres no gnolls, only taurens, anyways that is easy to change

but no if a gnoll died it wouldnt revive
 

Wrda

Spell Reviewer
Level 28
Joined
Nov 18, 2012
Messages
1,994
  • Dies
    • Events
      • Unit - A unit owned by Neutral Hostile Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Tauren
    • Actions
      • Wait 17.00 seconds
      • Set Unit = (Triggering unit)
      • Set Loc = (Position of Unit)
      • Unit - Create 1 Tauren for (Triggering player) at Loc facing (Facing of Unit) degrees
      • Custom script: call RemoveLocation(udg_Loc)
This.
 
Level 6
Joined
Jul 21, 2011
Messages
139
@Wrda, that would revive the unit where it died. That can be troublesome.

@caleman, instead of storing the x and y, store the location of the unit, use point array variable. Then create the new unit at that point.

i will check out your idea later, you think it can help map performance only or something more?
 
Status
Not open for further replies.
Top