HELP with items!! and hero reviving

Axtyler#1

New Member
Reaction score
1
ok so im making a map where there are item recipies. I get how to make recipies but what i dont get is how to make it say in the information box that it requires certain items to make it. For example in dota when u want to buy an item it says in the information tab
Requires
Ring of Regeneration
Ring of Protection

My other question is how to make it so that heroes revive in 20 seconds after they die. Again i use the example from dota. When your hero dies in dota, it shows a timer telling you that you have 20 seconds left until you hero is revived

Any help is greatly appreciated:D
 

Komaqtion

You can change this now in User CP.
Reaction score
469
1. You just add those line to the tooltip in the object editor ;)
2. Does it have to be MUI ?? (MUI = Multi Unit Instanceable = Can be cast by several unit at the same time AND WORKING FOR ALL OF THEM) or can it just be MPI ? ((MPI = Multi Player Instanceable = Can be cast by one unit per player at the same time AND WORKING FOR ALL OF THEM)
 

Axtyler#1

New Member
Reaction score
1
Thanks and Confused

1. ok i get what ur saying bout my 1st question but, do you kno how to make the letters yellow like in dota? In dota it says in yellow "Requires" and then what it requires in white.
2. Im not sure if the MUI thing is what i want or not=/ all i want to do is if lets say Blues hero dies in the middle of the map then he will revive in 20 seconds at the top of the map.
 

Danis[h]

New Member
Reaction score
19
For hero revival I use this in my map

Just add a timer window and change the wait to 20 seconds.
It will work even if the player has more than one hero.
Trigger:
  • Hero Respawn
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to True
      • ((Dying unit) belongs to an ally of Player 1 (Red)) Equal to True
    • Actions
      • Custom script: local player HeroOwner = GetOwningPlayer(GetDyingUnit())
      • Custom script: local unit ress = GetDyingUnit()
      • Custom script: local location t = udg_HeroRespawnLoc[GetConvertedPlayerId(GetOwningPlayer(ress))]
      • Game - Display to (Player group((Owner of (Dying unit)))) the text: |c00ffcc00Your hero...
      • Wait 15.00 seconds
      • Custom script: call ReviveHeroLoc( ress, t, true )
      • Custom script: call PanCameraToTimedLocForPlayer( HeroOwner, t, 0.00 )
      • Custom script: set ress = null
      • Custom script: set t = null
      • Custom script: set HeroOwner = null
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Here's a little more efficient trigger :D
JASS:
function Trig_Revive_Heroes_Conditions takes nothing returns boolean
    if IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true then
        return true
    endif
    return false
endfunction

function Trig_Revive_Heroes_Actions takes nothing returns nothing
    local unit u = GetTriggerUnit()
    local player p =GetOwningPlayer(u)
    local location loc = Location(GetRectCenterX(gg_rct_Revive_Area),GetRectCenterY(gg_rct_Revive_Area))
    call TriggerSleepAction(20)
    call ReviveHeroLoc( u, loc,true )
    call PanCameraTo(GetLocationX(loc),GetLocationY(loc))
    call RemoveLocation(loc)
    set u = null
    set p = null
endfunction

//===========================================================================
function InitTrig_Revive_Heroes takes nothing returns nothing
    set gg_trg_Revive_Heroes = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Revive_Heroes, EVENT_PLAYER_UNIT_DEATH )
    call TriggerAddCondition( gg_trg_Revive_Heroes, Condition( function Trig_Revive_Heroes_Conditions ) )
    call TriggerAddAction( gg_trg_Revive_Heroes, function Trig_Revive_Heroes_Actions )
endfunction


or

Trigger:
  • Revive Heroes Copy
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Custom script: local unit u = GetTriggerUnit()
      • Custom script: local player p =GetOwningPlayer(u)
      • Custom script: local location loc = Location(GetRectCenterX(gg_rct_Revive_Area),GetRectCenterY(gg_rct_Revive_Area))
      • Custom script: call TriggerSleepAction(20)
      • Custom script: call ReviveHeroLoc( u, loc,true )
      • Custom script: call PanCameraTo(GetLocationX(loc),GetLocationY(loc))
      • Custom script: call RemoveLocation(loc)
      • Custom script: set u = null
      • Custom script: set p = null


The only thing that needs changing is:
JASS:
gg_rct_Revive_Area

change that to gg_rct_(Your_Region) and it should work ;)
 

Danis[h]

New Member
Reaction score
19
I didn't remove the location because it's pointing to a different udg_ variable that I have to use later :)
 

simonake

New Member
Reaction score
72
Too hard?

Why not
Trigger:
  • Events
    • Unit - A Unit Dies
    • Conditions
      • (Triggering unit) is a Hero Equal to TRUE
    • Actions
      • Wait 10 seconds
      • Unit - Revive (Triggering unit) Instantly at <>
 

Danis[h]

New Member
Reaction score
19
Too hard?

Why not
Trigger:
  • Events
    • Unit - A Unit Dies
    • Conditions
      • (Triggering unit) is a Hero Equal to TRUE
    • Actions
      • Wait 10 seconds
      • Unit - Revive (Triggering unit) Instantly at <>

what will happen then if two heroes die within the timeframe of 10 seconds.
the first hero dies at 0, and the second hero dies 3 seconds later? The second hero would revive 7 seconds later, leaving the first dying hero dead indefinately?
 

simonake

New Member
Reaction score
72
No that's not what's happening.

(Triggering unit) is like a local. It has the same property of a local. It work for unit respawn it should for hero too.
 

Danis[h]

New Member
Reaction score
19
No that's not what's happening.

(Triggering unit) is like a local. It has the same property of a local. It work for unit respawn it should for hero too.

I just tested this, and it seems that you're right... Didn't know :)
 

Axtyler#1

New Member
Reaction score
1
Thank YOU!!

No that's not what's happening.

(Triggering unit) is like a local. It has the same property of a local. It work for unit respawn it should for hero too.

Yea his does work. And thanks for the other guys for trying. Yours probably worked fine im just not familiar enough with Editor to get custom scripts yet D=. If i could id give rep to each of ya thanks again:thup:
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Just so you know, triggering unit can get a little unstable after too long waits :S
 
General chit-chat
Help Users
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top