| 08-25-2004, 07:54 PM | #1 |
hi, i'm just making a little campaign map, and i need to know how to make the enemy units/ creeps revive or something when they die, since its a small map thats what i want to do, if you could give any help at all it would be worth it, thanks. |
| 08-25-2004, 08:06 PM | #2 |
Are there more people who wonder what he actually said? ... |
| 08-25-2004, 08:09 PM | #3 | |
Quote:
he wants units to respawn......like in the Myth Hunters game. like, you kill something, then 5 minutes later or something it comes back to life, and then you kill it, and it comes back in 5 more mins........like a permanent creep. dunno how to do it tho :p |
| 08-25-2004, 08:11 PM | #4 |
sorry if that was a little vague, but all i want to do is to kill a unit in game, then have the same unit i killed to come back to life. Without items or abilites. |
| 08-25-2004, 08:26 PM | #5 | |
Quote:
ok there are 2 ways I know of.......but I am rather new to this so there might be a better way: 1: is to give the unit Reincarnation.....but thats the easy way out, and its an ability. 2: there is a trigger...under Create New Action -> Units -> Create Units Facing Angle I believe its called.....or something like that. anyways, it allows you to create any number of units anywhere........I am not sure how this would work for you.....try it and let me know! |
| 08-25-2004, 08:27 PM | #6 |
Well im not a very good map maker in wc3 yet but i thought something like this: Variable UnitDied is just and Integer variable Variable died[] is a Unit-Type aray Variable diedb[] is a Point aray Code:
Events -A unit owned by Player # dies Conditions Actions -Set UnitsDied = UnitsDied + 1 -Set died[UnitsDied] = Unit Type of Triggering Unit -Set diedb[UnitsDied] = Position Of Triggering Unit Events -Every 300 seconds of game time Conditions -UnitsDied greater than 0 Actions -For Each Integer A from 1 to UnitsDied do Action --Create 1 died[Integer A] for Player # at Center Of diedb[Integer A] facing default facing degrees The only thing is, if a unit dies half way through the 300 seconds, then it will respawn in 2.5 minutes. You might be able to do something like this tho, not sure. Variable diedc[] is a Integer array Code:
Events -A unit owned by Player # dies Conditions Actions -Set UnitsDied = UnitsDied + 1 -Set died[UnitsDied] = Unit Type of Triggering Unit -Set diedb[UnitsDied] = Position Of Triggering Unit -Set diedc[UnitsDied] = 300 Events -Every 1 seconds of game time Conditions -UnitsDied greater than 0 Actions -For Each Integer B from 1 to UnitsDied do Action --Set diedc[Integer B] = diedc[Integer B] - 1 Events -Every 1 seconds of game time Conditions -UnitsDied greater than 0 Actions -For Each Integer A from 1 to UnitsDied do Action --if diedc[Integer A] is equal to 0 then do Create 1 died[Integer A] for Player # at Center Of diedb[Integer A] facing default facing degrees else do Do Nothing Then you can just add other stuff into the triggers. Sorry i dont know jass or else i would have wrote it in jass. I hope it works! |
| 08-26-2004, 12:14 PM | #7 |
Or like this: Event; a unit owned by player X dies Condition; dying unit is a hero equal to false Action; Wait 60 sec. Unit - Unit create 1 (unittype of (dying)) for (owner of (dying unit)) at position of (position of (dying unit) facing default facing degrees. |
| 08-26-2004, 05:41 PM | #8 |
Thanks Mainly to Frozzt because i used his trigger help because it was the easiest to understand. |
| 08-26-2004, 06:12 PM | #9 |
Tell me if it works, only works sometime for me and I don't know why |
| 08-26-2004, 07:08 PM | #10 |
Remember, there is also an event: "Generic Unit dies" , I think it might come handier instead of just players.. |
| 08-27-2004, 12:51 PM | #11 |
I know ^_^ , but I thought if it were a map were you had a computer player, then its annoying if your unit dies and you always get a new one. |
