• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

could anyoen help me in my map

Status
Not open for further replies.
Level 9
Joined
Jun 25, 2009
Messages
427
With the hero reviving i could help, cause i have it perfect (kind of) in my map.
By the things you are asking, i guess you are creating an AoS type map.

  • Hero Reviving
    • Events:
      • Unit - A unit Dies
    • Conditions:
      • (Dying Unit) is a Hero equal to True
    • Actions:
      • If (All conditions are true) then (do actions):
        • If - Conditions:
          • (Owner of Dying Unit) is equal to Player 2 (Blue)
        • Then - Actions:
          • Wait 15.00 Seconds of (game time)
          • Unit - Revive (Dying Unit) at Revive[Player Number (Owner of Dying Unit)]
          • Camera - Pan camera for (Owner of Dying Unit) to Revive[Player Number (Owner of Dying Unit)] over 2.00 seconds
        • Else - Actions:
          • If (All conditions are true) then (do actions):
            • If - Conditions:
              • (Owner of Dying Unit) is equal to Player 3 (Teal)
            • Then - Actions:
              • Wait 15.00 Seconds of (game time)
              • Unit - Revive (Dying Unit) at Revive[Player Number (Owner of Dying Unit)]
              • Camera - Pan camera for (Owner of Dying Unit) to Revive[Player Number(Owner of Dying Unit)] over 2.00 seconds
Do this with every player. Of course, if you want you can change the wait into some variable (something with levels, etc), you can create a timer that show the revive time.

Now, here i used something that you don't know, The variable Revive[] so here's what i did.

  • Revive Place Setting
    • Events:
      • Time - Elapsed game time is 0.01
    • Conditions:
    • Actions:
      • Set Revive[1]=Position of (Circle of Heroes 0001 <gen>)
      • Set Revive[2]=Position of (Circle of Heroes 0002 <gen>)
      • Set Revive[3]=Position of (Circle of Heroes 0003 <gen>)
      • Set Revive[4]=Position of (Circle of Heroes 0004 <gen>)
      • Set Revive[5]=Position of (Circle of Heroes 0005 <gen>)
      • Set Revive[6]=Position of (Circle of Heroes 0006 <gen>)
      • Set Revive[7]=Position of (Circle of Heroes 0007 <gen>)
      • Set Revive[8]=Position of (Circle of Heroes 0008 <gen>)
      • Set Revive[9]=Position of (Circle of Heroes 0009 <gen>)
      • Set Revive[10]=Position of (Circle of Heroes 0010 <gen>)
      • Set Revive[11]=Position of (Circle of Heroes 0011 <gen>)
      • Set Revive[12]=Position of (Circle of Heroes 0012 <gen>)
I hope this will help :)

Tiche3:grin:
 
Yes, Tiche3, that one leaks. You don't have to define the locations in the beginning of the map. You instead need to use a Unit variable, with an array, and do it like this:
  • Tr
  • Events
    • Map Initialization
  • Conditions
  • Actions
    • Set Units[1] = Circle of Power 001 <gen>
    • Set Units[2] = Circle of Power 002 <gen>
    • ...
    • Set Units[10] = Circle of Power 010 <gen>
  • Trigger
  • Events
    • Unit - A unit dies
  • Conditions
    • ((Triggering unit) is a Hero) Equal to True
  • Actions
    • For each (IntegerA) from 1 to 10, do (Actions)
      • Loop - Actions
        • Set Points[(IntegerA)] = (Position of (Units[(IntegerA)]))
        • Hero - Revive (Triggering unit) at (Points[PlayerNumber of (Owner of (Triggering unit))])
        • Custom script: call RemoveLocation (udg_Points[bj_forLoopAIndex])
 
Level 9
Joined
Jun 25, 2009
Messages
427
Dude, pharaoh, but doesn't it delete THE WHOLE location? and by the way YES, i WROTE THE VARIABLES ;p and actually, i thought that leaks are when used like every 0.5 SET something and not delete it, the unit variables are not deleted anywhere so i don't know why should you delete the position of the unit if the unit is PERMANENT ;P So yeah good luck with mapping, i'll write something to help you here soon :)

EDIT: Pharaoh, i didn't see that you used Unit array, i used Point array to store the points of THE units :) so it's kind of different :), maybe you didn't check my triggers from begining till ending, i don't know ;D And yes, in my map i have defined locations, I CREATED UNITS IN PLACES so i could store them in variables by using point of something <gen>

isent this leaky?

Actually, i created the circles in my map and then just set PERMANENT locations of them in a variable, that's why i think you don't need to use Call RemoveLocation(udg_Revive[]) because your circles don't move and they're permanent, you set the position one time, you don't set it once again and again and again and again and etc...

EDIT: I thought about your easy mode, it's quite simple :D

  • Money
    • Events:
      • Time - Every 1.00 second of the game
    • Conditions:
      • Base [Team 1] is alive equal to True
      • Base [Team 2] is alive equal to True
    • Actions:
      • Player Group - Pick every player in (All Players) and (do actions):
        • Player - Set (Picked Player) current gold to (Current gold of (Picked Player)+1)
The Triggerer of em

  • EM Triggerer
    • Events:
      • Player - Player 2 (Blue) writes -em as an exact match
    • Conditions:
    • Actions:
      • Game - Text to (All Players): Game mode has been set to: Easy Mode
      • Trigger - Turn off (Money <gen>)
      • Trigger - Turn on (Em Money <gen>)
      • Trigger - Turn off (this trigger)
The EM
  • Em Money
    • Events:
      • Time - Every 1.00 second of game
    • Conditions:
      • Base [Team 1] is alive equal to True
      • Base [Team 2] is alive equal to True
    • Actions:
      • Player Group - Pick every player in (All Players) and (do actions):
        • Player - Set (Picked Player) current gold to (Current gold of (Picked Player)+2)
Yep, hope it'll work
 
Tiche3, you really should read about leaks. I know their position doesn't change, but you create 10 locations in the beginning, which is already a massive leak. So, in order to prevent this leak, we have to call the position of the units each time a hero dies, so that we can remove them afterwards. The positions leak, the units array (in this example) doesn't, that is why we prefer the Units array option.
 
Level 9
Joined
Sep 28, 2004
Messages
365
Offtopic:
Tiche3 trigger doesn't leak. Defining a postion at start DOESN'T leak. As long as the variable is not replaced at any point after defining it will not leak!

Eg:
  • set abc[1] = Position of (bla1 <gen>)
  • set abc[2] = Position of (bla2 <gen>)
this won't leak because we still have variables pointing towards to location. At anytime we want to destroy it, we can destroy it because we can still find it through a variable.


This will leak:
  • set abc[1] = Position of (bla1 <gen>)
  • set abc[1] = Position of (bla2 <gen>)
Because abc[1] isn't pointing to "bla1" anymore and therefore the object leaks, because there is no way we could find it back.
 
Level 9
Joined
Jun 25, 2009
Messages
427
Offtopic:
Tiche3 trigger doesn't leak. Defining a postion at start DOESN'T leak. As long as the variable is not replaced at any point after defining it will not leak!

Eg:
  • set abc[1] = Position of (bla1 <gen>)
  • set abc[2] = Position of (bla2 <gen>)
this won't leak because we still have variables pointing towards to location. At anytime we want to destroy it, we can destroy it because we can still find it through a variable.


This will leak:
  • set abc[1] = Position of (bla1 <gen>)
  • set abc[1] = Position of (bla2 <gen>)
Because abc[1] isn't pointing to "bla1" anymore and therefore the object leaks, because there is no way we could find it back.

Thanks for backin me up jeff, actually this was what i thought when i wrote to shanghai's request :) (i'm using it by myself :O)

Tiche3:grin:
 
Level 19
Joined
Feb 15, 2008
Messages
2,184
yep those are following. U guys are nice peps. heheh i dident know he wasent leaking o_O- But i need those

ap
ar
apem
arem
em

ap=allpick
ar=all random
apem=all pick easy mode
arem=all random easy mode
em=easy mode towers is half life. So they is weaker half life. Not like burning or anything just so thye got half life down.
 
Level 9
Joined
Jun 25, 2009
Messages
427
yep those are following. U guys are nice peps. heheh i dident know he wasent leaking o_O- But i need those

ap
ar
apem
arem
em

ap=allpick
ar=all random
apem=all pick easy mode
arem=all random easy mode
em=easy mode towers is half life. So they is weaker half life. Not like burning or anything just so thye got half life down.

LAWL i thought em is for money >.> and actually for the towers, i would suggest, but I don't know actually, never did this.

  • Easy Mode Towazz
    • Events:
      • Player - Player 2 (Blue) writes -em as an exact match
    • Conditions:
      • Mode_Set equal to False
    • Actions:
      • Set Mode_Set equal to True
      • Game - Text (All Players): Game mode has been set to: Easy Mode
      • Unit - Kill Tower[1]
      • Unit - Kill Tower[2]
      • Unit - Continue killing the towers
      • Unit - Create Tower [Easy Mode] at Tower_Location[1] for Player (Team 1) facing default building facing degrees
      • Unit - Create Towers [Easy Mode] at those locations for the players and later
      • Custom Script: call RemoveLocation(udg_Tower_Location[1,2,3,4,5,6,etc)]
Of course you'll have to create a unit array, point array and towers that have 50% hp of the normal towers :) (e.x tower has 1000 life then the weaker towers should have 500 base life so this is the case)

Hope this will work

Tiche3:grin:
 
Status
Not open for further replies.
Top