• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Hero Spawning

Status
Not open for further replies.
Level 2
Joined
Mar 14, 2005
Messages
13
Hey all

I would like to ask how can u make a DotA-like hero style map?

Like.. u got the tavern there.. then what? :p

How do u actually make it show the heroes u created that can be spawned?

forgive my english nad my noobiness :)
 
Level 13
Joined
Dec 29, 2004
Messages
597
actually there is no trick to spawn hero equal to what the player pick. simply just create a region around the tavern, and create the trigger:

if unit enter tavern region then
move unit instantly to region near the fountain

if you want each player can only has 1 hero and no other players can pick same hero, make it like this:

if unit enter tavern region then
- set limit training of hero for owner of triggering unit to 0
- Pick every player on allplayer and do
set limit training of unit type of triggering unit to 0

the first point suppose to limit the owner of triggering unit to pick another hero, so he only has the hero that he just already choose.

the second one suppose to limit another player so each player cannot pick that hero type.

I was like u too, for the first time i see dota hero selection system, but then i figure it out that it's not as hard as i think.
 
Level 2
Joined
Mar 14, 2005
Messages
13
i get this error:
call TriggerRegisterEnterRegionSimple( gg_trg_Spawning, Rect2Region(gg_rct_Tavern) )


the GUI trigger i used was:

Unit - Enters (Convert tavern <gen> to region)
Conditions - Triggering Units Is A hero = True
Action - Movie (Matching Unit) instantly to Center of Spawn <gen>

instead of matching unit i also tried triggering unit.. same error
 
Level 13
Joined
Dec 29, 2004
Messages
597
I think u can use just GUI trigger, not need for script, coz i didn't know about script and i can make that trigger :D

Just try to make 2 regions, one nearby the tavern (TavernReg)and the other nearby the fountain (FountainReg), and make this trigger:

Events:
Unit - Enters TavernReg
Conditions - Triggering Unit Is A hero = True
Action - Move Triggering Unit instantly to Center of FountainReg

If it works you can modify that trigger further, like limit trainin of hero and limit training of unit.

And remember this, there must be TRIGGERING UNIT since:

TRIGGERING UNIT: Used to represent unit that causing the triger works.
MATCHING UNIT: Used to represent unit that was checked its condition when you pick up every unit on unit group with matching condition.
PICKED UNIT: Used to represent unit that was picked, after the matching condition filter was done.

and many more variables that you must know what those variables represent for.
 
Status
Not open for further replies.
Top