Monday, April 16, 2012

Reviving Heros Trigger

Hey i need to create a trigger that revives a hero when it dies, i cant set it to just a hero, it needs a specific unit, can any help me with that?|||I gota same problem. Are you making your own DotA? Well I am, so if you want we can make map together.|||Event: Unit dies

Conditions: Unit is equal to hero

Unit equal to green team = True

Actions: Wait X time

Revive triggering unit

Move triggering unit to Green Spawn 1

<Multyboard tihng for hero deathness>

Event: Unit dies

Conditions: Unit is equal to hero

Unit equal to red team = True

Actions: Wait X time

Revive triggering unit

Move triggering unit to Red Spawn 1

<Multyboard tihng for hero deathness>

that sort of thing. :D|||Try this

Test

Events

Unit - A unit Dies

Conditions

(Unit-type of (Dying unit)) Equal to Admiral Proudmoore

(Unit-type of (Dying unit)) Equal to Antonidas

(Unit-type of (Dying unit)) Equal to Antonidas (Ghostly)

Actions

Game - Display to (All players) the text: ((Name of (Owner of (Dying unit))) + Hero has died!)

Countdown Timer - Create a timer window for (Create a periodic One-shot timer lasting Death_Time[(Player number of (Owner of (Dying unit)))]) with title (Until + ((Name of (Owner of (Dying unit))) + Hero revives))

Countdown Timer - Start (Last started timer) as a One-shot timer that will expire in 30.00 seconds

Set Death_Time[(Player number of (Owner of (Dying unit)))] = (Death_Time[(Player number of (Owner of (Dying unit)))] + Death_Time[10])

Wait Death_Time[(Player number of (Owner of (Dying unit)))] seconds

Hero - Instantly revive (Triggering unit) at (Center of (Playable map area)), Show revival graphics



I used 1 varriable in this "Death_Time" a Real with an Array of 12 starting off with the value of 10. That means whenever a unit dies it increases by 10 seconds then a timer shows how long they wait and i have a wait function waiting whatever the value of Death_Time is. Also i used an array so if 2 people die within 10seconds of whatever time Death_Time is it wont revive just 1.|||no i aint makin my own DotA, but more of a Heromatch rpg sort of thing, and another thing i dont get that **** with arrays... WHAT in satans name are they |||can sum1 tell me how to import my models?? i tried the tut on www.wc3sear.ch but i didnt work.. HELP!|||Arrays http://maps.worldofwar.net/tutorials.php?id=73\

and to import models all you do is after you import you delete the wc3import\ thing|||when i delete the part of the path that says Wc3import\ i says "couldnt load Mdx|||Well this topic seems to be of interest to me so I'll go ahead and post my problem too:

http://www.beelzebub.se/files/images/temp/heroresp.jpg

It simply doesn't work, the hero never respawns?|||Quote:








Well this topic seems to be of interest to me so I'll go ahead and post my problem too:

http://www.beelzebub.se/files/images/temp/heroresp.jpg

It simply doesn't work, the hero never respawns?




make an variable that saves the unit (so: Set VarHero = (dying unit) or smth) and then use that variable in the respawn section, it just doesn't save the unit after 15 sec I think ...|||Well, I also tried making the trigger this way to find out where things go wrong:

http://www.beelzebub.se/files/images/temp/heroresp2.jpg

Everything in the action-section works, EXCEPT the reviving. So there's no doubt the game "knows" which unit it is.|||This is how I do it.

Events

- A unit dies

Conditions

- Unit-type of (Dying Unit) equal to A Hero

Actions

- Wait 5.00 seconds

- Revive (Dying Unit) Instantly at Region:Team1Revive

OR, if you want to use variables, when the player picks a hero:

Events

- A unit is trained

Conditions

- Unit-type of (Trained unit) equal to A Hero

- Player owner of (Trained Unit) equal to Player 1 (Red)

Actions

- Set P1Hero = Last trained unit

THEN THE NEXT TRIGGER:

Events

- P1Hero dies

Conditions

- none

Actions

- Revive P1Hero Instantly at Team1Revive|||Alright this is completely ***. If the unit I want to revive belong to a computer player it doesn't work. But if it belongs to me it works. Is there anyway to fix so that it works with a computer player too?|||can u send the trigger that u use...|||The most recent trigger I tried was this one:

http://www.beelzebub.se/files/images/temp/heroresp3.jpg

Still, whenever I change things so that it is a human player that owns the unit there are no problems whatsoever. But when it's computer the revive-part doesn't work, EVERYTHING else except the revive.|||Quote:








when i delete the part of the path that says Wc3import\ i says "couldnt load Mdx




Did you import all the skins?

and sometimes the editor doesnt like loading everything you import so just try restarting it also.|||Its because the Neutral Hostile Player doesnt have enough food to revive the hero. Set all the Heroes to use zero supply (unless you are using food, in which case, give neutral hostile food). This vexed me for ages when I was creating CHA. Took me forever to figure out that was the problem.|||i Did restart the editor and it just wont work! doesnt any1 know how to import units???!|||http://www.wc3sear.ch/?p=Tutorials&t=Import_Models|||Thank you for the tip, I'll check it out right away SlayerDragon.|||Didn't work. To be sure I added some triggers to check food usage (15 at the time) and food cap (299 at the time) of the player.

I must have some trigger or something interfering with the revive, but I've no idea what ;/|||Everything so far works, thx alot guys but now i need your help once again i need to add 2 items to a hero at right away when its selected, the trigger for selecting is

Event:

A unit enters Region Select.

Condition:

unit equal to Wisp

Action:

Create 1 Hero for Triggering Player at location Spawn

or sumething like that

so cant any1 help? |||You could do it like this (although this isn't to most "clean" way if there are more units created when you hero is, but you can work around that if you want)


Code:
    Events
Unit - A unit enters region
Conditions
Actions
Unit - Create 1 hero for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
Hero - Create Tome of Experience and give it to (Last created unit)
|||Food CAP and Food AVAILABLE are different...

make sure that he has food available.|||The food does not seem to be the problem, sadly enough.|||i looked at your trigger and maybe the problem is that u use "DeadHero[1]" <= the 1 is the problem, it refers to a specific element in ur array, better way:

as Event use : -a Unit dies (<= it works for all players even neutral hostile)

as Array elemt use: DeadHero[Playernumber of(Owner of(Dying Unit ))]|||Ok this is most likely wrong and i hold its weight with a finger.

have you got the AI settings on the enomy player.

And if so meybe the second he dies it tries to revive him with a building and because its in the process of reviving it wont move to the spot.

Or the AI is not activated and the game does not understand how to revive him because of it.|||Sorry to keep harping on this but how did you make sure food isn't the problem?

And as far as testing is concerned, you checked something reallly simple like

E - A unit dies

C - Unit is a hero

A - Wait 5 seconds

Revive dying unit

to ensure that it's not a different part of your triggering that's causing the issue

Does the neutral hostile hero have "Can Revive" Set to true in Object Editor?|||I couldn't find the field "Can Revive" in the objecteditor.

I checked the food limit by having three chat commands, one displayed the current food usage, one the food cap, and one the food max.

I looked through some abilities and found two that might be of use, "Revive Hero" and "Revive Hero Instantly".||| VICTORY!! (for now)

so far all your posts have been very useful, now i need some help with something a little more complicated

i need to make a sort of "score" system where the playrs can see how many heroes theyve killed.. hopefully someone can do it without variables..

No comments:

Post a Comment