| 09-06-2004, 02:00 PM | #1 |
Greetings members, I was thinking of making revive system like in World Of Warcraft In my map. Its like when you die, then a ghost(shade?) should be created for you and then you have to move it to your corpse to revive. Could this be possible? ![]() |
| 09-06-2004, 03:26 PM | #2 |
Yes very possible. Create a region for each player's hero. Create a Trigger like this Reds Region Event Every 1 second of the game Condtion none Event Move region (Red01 <gen>) to Postion of (Reds hero) ok, now that will continualy move the region to whever reds hero is. Now, when he dies, the region will be where he died. But, to prevent the body from disapating you need to create another trigger. Stop Reds Decay Event A unit dies Condition (Dying Unit) equal to (red hero) Action Wait .50 seconds Pause (red hero) Create 1 (ghost) for (player 1 red) at (ghost spawn) Now, im pretty sure that should stop him from disapating, then you need a trigger to allow him to be revived. Revive Red Event Unit Enters (red 01 <gen>) Conditon Unit type of (entering unit) equal to (ghost) Owner of (entering unit) equal to (player 1 red) Action Remove (entering unit) from the game Revive (red hero) instantly at (red01 <gen>) Pan Camera for (player 1 red) to (red 01 <gen>) Over 1 second This should do it, post here agin if you still have trouble. |
| 09-06-2004, 04:19 PM | #3 |
works like a charm niro, just tested it. now i just have to figure out how to make it more multiplayer compatable. hmm just tried this, didnt work. don't know what the problem is, niro, help me in all your wiseness on the matter only did the trigger for blue and red edit 2: got it to make the shade, but when i went to the graveyard, it didnt revive the selected hero. region moving trigger Code:
regions
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
Region - Center reds hero <gen> on (Position of reds_hero)
Region - Center blues hero <gen> on (Position of blues_hero)unit dies trigger Code:
suspend dead hero
Events
Unit - A unit Dies
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Dying unit)) Equal to Player 1 (Red)
Then - Actions
Wait 1.00 seconds
Unit - Pause reds_hero
Unit - Create 1 Shade for (Owner of (Dying unit)) at (Center of reds hero <gen>) facing Default building facing degrees
Game - Display to (Player group((Owner of (Dying unit)))) the text: Go to the Graveyard...
Cinematic - Ping minimap for (Player group((Owner of (Dying unit)))) at (Center of (Playable map area)) for 8.00 seconds, using a Flashy ping of color (0.00%, 100.00%, 100.00%)
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Dying unit)) Equal to Player 2 (Blue)
Then - Actions
Wait 1.00 seconds
Unit - Pause blues_hero
Unit - Create 1 Shade for (Owner of (Dying unit)) at (Center of blues hero <gen>) facing Default building facing degrees
Game - Display to (Player group((Owner of (Dying unit)))) the text: Go to the Graveyard...
Cinematic - Ping minimap for (Player group((Owner of (Dying unit)))) at (Center of (Playable map area)) for 8.00 seconds, using a Flashy ping of color (0.00%, 100.00%, 100.00%)
Else - Actions
Do nothingrevive hero Code:
revive hero
Events
Unit - A unit enters Region 002 <gen>
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Triggering unit)) Equal to Player 1 (Red)
Then - Actions
Hero - Instantly revive reds_hero at (Center of Region 002 <gen>), Hide revival graphics
Unit - Remove (Triggering unit) from the game
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Triggering unit)) Equal to Player 2 (Blue)
Then - Actions
Hero - Instantly revive blues_hero at (Center of Region 002 <gen>), Hide revival graphics
Unit - Remove (Triggering unit) from the game
Else - Actions
Do nothingselect hero Code:
revive hero
Events
Unit - A unit enters Region 002 <gen>
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Triggering unit)) Equal to Player 1 (Red)
Then - Actions
Hero - Instantly revive reds_hero at (Center of Region 002 <gen>), Hide revival graphics
Unit - Remove (Triggering unit) from the game
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Triggering unit)) Equal to Player 2 (Blue)
Then - Actions
Hero - Instantly revive blues_hero at (Center of Region 002 <gen>), Hide revival graphics
Unit - Remove (Triggering unit) from the game
Else - Actions
Do nothingdont know what the problem here is, help is appreciated. |
| 09-06-2004, 05:21 PM | #4 |
I'll try to make it work, if you let me use the triggers. I'll just edit this for the triggers |
| 09-06-2004, 05:26 PM | #5 |
you used region 002 in your revive trig you should use reds hero or blues hero. you need multiple triggers, one for each hero |
| 09-06-2004, 05:57 PM | #6 | |
Quote:
Or just use a unit Array and player Array I'll try make a system |
| 09-06-2004, 06:13 PM | #7 |
Why would you need a player array? The players are already nicely arranged with their player numbers. |
| 09-06-2004, 07:37 PM | #8 |
How can I make it so the region follows unit that havent been created? I need to do like unit owned by player(hero unit) because players need to choose heros in my map so they dont have a hero in start. |
| 09-06-2004, 07:42 PM | #9 | |
Quote:
You need to make a Unit Array and set player's chosen unit (in the trigger where he chooses units) to 1 in that array But still, just give me some time to try it out... |
| 09-06-2004, 07:53 PM | #10 |
Ok Met, for the reviveal, use entering unit instead of triggering unit,. And since you already defined the owner of the player, you don't need to have owner of dying unit, just use player 1, 2 etc. that goes for the entire trigger, or any trigger that you have specifically defined the owner of the unit. For the select hero thing, use entering unit again. And you do not need multiple triggers for each hero, the If/Then/Else works fine, in this case. @ arkidas, do the trigger that i said before to make the region follow the hero. this one Reds Region Event Every 1 second of the game Condtion none Event Move region (Red01 <gen>) to Postion of (Reds hero) And i dunno what soul is talking about with an aray. if anyone has further questions please ask. |
| 09-06-2004, 08:19 PM | #11 |
Uhm yes you could tell me how I make reds hero, what should that be man? :\ |
| 09-06-2004, 08:49 PM | #12 | |
Quote:
i set reds_hero as a unit variable. then did this: set reds_hero=last created unit also, niro, above, thats not my selection code, i accidently copied the wrong code. heres the right one: Code:
select
Events
Unit - A unit enters hero select <gen>
Conditions
Actions
Unit - Remove (Triggering unit) from the game
Unit - Create 1 Blademaster for (Owner of (Triggering unit)) at (Center of (Playable map area)) facing Default building facing degrees
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Triggering unit)) Equal to Player 1 (Red)
Then - Actions
Set reds_hero = (Last created unit)
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Triggering unit)) Equal to Player 2 (Blue)
Then - Actions
Set blues_hero = (Last created unit)
Else - Actions
Do nothing |
| 09-06-2004, 09:36 PM | #13 |
I already said, use entering unit, not triggering unit. And, make a unit variable called reds_hero with a trigger make the unit the variable set (hero01) to (reds_hero) like that. |
| 09-07-2004, 02:14 AM | #14 | |
Quote:
for the select system this is what I did, before all the If/Then/Elses: Code:
Set Hero = (Last created unit) then in the If/Then/Elses: Code:
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Triggering unit)) Equal to Player 1 (Red)
Then - Actions
Set reds_hero = Hero
Else - Actions
Do nothing |
| 09-07-2004, 02:44 AM | #15 |
To try to test it for multi, just play as different players, and see if the triggs work. |
