HELP!! Hero Respawn trigger!

Penguin-

Member
Reaction score
4
Someone plz tell me where i am going wrong, ive been looking at it for hours.

It comes in 2 parts. (N.B i have a seperate trigger for part 2 for each player)

Human Part 1
Events
Unit - A unit owned by Player 2 (Blue) Dies
Unit - A unit owned by Player 3 (Teal) Dies
Unit - A unit owned by Player 4 (Purple) Dies
Unit - A unit owned by Player 5 (Yellow) Dies
Unit - A unit owned by Player 6 (Orange) Dies
Conditions
((Triggering unit) is A Hero) Equal to True
((Dying unit) belongs to an ally of Player 1 (Red)) Equal to True
Actions
Game - Display to (Player group((Owner of (Triggering unit)))) the text: ( Your hero has fallen and will be revived in + ((String(((Hero level of (Dying unit)) x 5))) + seconds.))
Countdown Timer - Start HeroTimer[(Player number of (Owner of (Dying unit)))] as a One-shot timer that will expire in (5.00 x (Real((Hero level of (Dying unit))))) seconds
Set Hero[(Player number of (Owner of (Dying unit)))] = (Dying unit)

HUman Part 2
Events
Time - HeroTimer[2] expires
Conditions
Actions
Hero - Instantly revive Hero[2] at (Center of Human Spawn <gen>), Show revival graphics

I had something similar to this before and it worked fine (the only difference being that there was no array on the timer, which meant that as soon as the timer finished all waiting heroes were respawned. Now i have added an array it doesnt work.)

And as per usual i am on RoC, but i shouldnt think that would effect such a simple trigger.

Peng- :(
 
yeah i still get the your hero blah blah but then nothing happens which makes me think that the array is not writing the player index in correctly... or something... :confused:

Peng


EDIT: Oh and how do i set the array? As far as i can see i can just select whether i want an array or not..

EDIT2: Hurray 50+. :D
 
the Lumpy said:
The fixed array size option wasn't added until Frozen Throne.

The size isnt realy the maximum size, it is how long the array is filled with vaules. So for exaple if you have an timer array with size 4 you cannot start the timer indexed as 5, since there is no timer there but you can easy create a timer and add it to the 5th index

Is RoC arrays initilized to the maximum vaule (~8000) or only to 1?

If the array only is initilized to 1 I suggest this:

Make a trigger with the event map initilazion, convert it to custom script (under the tap Edit)

You will se something silmular to this:

Code:
function Trig_TRIGGERNAME_Actions takes nothing returns nothing
endfunction

//===========================================================================
function InitTrig_TRIGGERNAME takes nothing returns nothing
    set gg_trg_TRIGGERNAME = CreateTrigger(  )
    call TriggerAddAction( gg_trg_TRIGGERNAME, function Trig_TRIGGERNAME_Actions )
endfunction

just under the first line, but over the 'endfunction', you add this:

Code:
local integer i = 1
loop
    exitwhen i > 12
    set udg_HeroTimer[i] = CreateTimer()
    set i = i + 1
endloop

Then save the map at a NEW location so you dont save over your old map, if you get error screw this, if no errors test and se if it works.
 
The reason it doesn't work is because you used Triggering Unit. That does not work with the condition (a unit dies) because there is no Triggering unit, just a killing unit and a dieing unit.
 
AgentPaper said:
The reason it doesn't work is because you used Triggering Unit. That does not work with the condition (a unit dies) because there is no Triggering unit, just a killing unit and a dieing unit.

Triggering Unit is the same as Dying Unit with the event a unit dies, Dying Unit is just a little faster and easier to understand.
 
no, triggering unit isn't dieing unit, it doesnt work, havent you ever tried it?
 
What player are you when you test this? Player 1?

And, do you need this condition: " ((Dying unit) belongs to an ally of Player 1 (Red)) Equal to True"?
 
I am player 2, an ally of player Red.

I see your point that it is unneccessary, but surely thats not the problem as i am getting the text up, which means the conditions have been fulfilled.

In a desperate attempt to get it to work, i have created a new trigger for each player, like this. (got rid of the array malarky about owner of players)

Player2 Respawn
Events
Unit - A unit owned by Player 2 (Blue) Dies
Conditions
((Triggering unit) is A Hero) Equal to True
((Dying unit) belongs to an ally of Player 1 (Red)) Equal to True
Actions
Game - Display to (Player group((Owner of (Triggering unit)))) the text: ( Your hero has fallen and will be revived in + ((String(((Hero level of (Dying unit)) x 5))) + seconds.))
Countdown Timer - Start HeroTimer[2] as a One-shot timer that will expire in (5.00 x (Real((Hero level of (Dying unit))))) seconds
Set Hero[2] = (Dying unit)

Player2 Revival
Events
Time - HeroTimer[2] expires
Conditions
Actions
Hero - Instantly revive Hero[2] at (Center of Human Spawn <gen>), Show revival graphics


This STILL doesnt work....

Peng-
 
If you put a "Game - Display to ... 'Time's up'" as action in your revival trigger,
do you see it?

If yes, change it to show "Name of Hero[2]".
Do you see that too?
 
I think i have found the problem.

I made a whole new variable which is not got an array, so it simply started a timer and when it expires he respawns. It works

Then i added an array (which i set to 1) and it still works. Then i tried array of 2 and it doesnt.

This makes me think that in RoC the max array size u can have is 1. (i.e either off or on.) Unfortunately this means that i will now have to make a variable for every player (10) :(

Peng-

EDIT: Please can someone tell me how I can revive a random hero on a team? I have used the random integer player number, but this doesnt work as it can randomly pick players that arent waiting for a hero to revive and therefore do nothing. This is what I have got.

Hero - Instantly revive Hero[(Player number of (Random player from (All allies of (Owner of (Triggering unit)))))] at (Position of Healer), Show revival graphics

I need to change the random part to make sure that they are "dead" or "waiting revival"

(it is basically an ability which instantly revives a hero waiting for revival at the point of the healer)

Peng-
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    we were down for a minute - think a log file or something got too big
    +1
  • Ghan Ghan:
    The alerts say it was down for a while unfortunately.
  • Ghan Ghan:
    Didn't know what was going on while I was at work.
  • Ghan Ghan:
    Disk filled up with logs. Fixed now.
    +1
  • The Helper The Helper:
    not a problem at all thanks for getting us back up
  • The Helper The Helper:
    I think the bots are finding a way to get through the anubis
  • The Helper The Helper:
    Happy Wednesday Everyone! Hope everyone has a Fantastic Day!
    +1
  • The Helper The Helper:
    Yeah, stats are showing big bot influx like 12k page views.
  • Wizard Wizard:
    :wave:
    +1
  • Ghan Ghan:
    TH changed his avatar again. 6 more weeks of summer.
    +3
  • Wizard Wizard:
    lol
    +1
  • The Helper The Helper:
    Guys just a heads up I am going to be shutting the site down soon. I am just waiting on the NUON people to decide whether they want to transfer forum data and keep the discord. My email is [email protected] for anyone that wants to keep in touch and I have a facebook too. I will make an official post later. Love you guys and will miss everyone!
    +1
  • V-SNES V-SNES:
    Sent a pm @The Helper
  • Stephen Stephen:
    Oh no - please don't lose the Nuon content
    +1
  • The Helper The Helper:
    Someone email AtariAge and see if they want me to transfer the forum data over to it
  • Ghan Ghan:
    Could probably keep NUON stuff around here if we wanted.
  • Ghan Ghan:
    Hmm what to do about the World Editor site though?
  • Stephen Stephen:
    I'd rather personally just own a backup of the Nuon data than see it go to AtariAge honestly. If it gets enshittified as per usual, or if some of the "regular" Jaguar folks get there, it's not gonna be fun
  • The Helper The Helper:
    There will be a github of the forum data so the NUON Forum Data I guess would be available there
  • The Helper The Helper:
    World Editor is technically Ryoko stuff not mine you guys can keep that I am not in that even
  • jonas jonas:
    :( end of an era :(
  • The Helper The Helper:
    Dont think of it as an end jonas - think of it as a beginning, because really my friend that is what it is.
  • A Andyoyo:
    Thank you for the hard work over the years. It did not go unnoticed.

The Helper Discord

Members online

No members online now.

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top