Unit-Type to string

Hadezown

TH.net Regular
Reaction score
5
Im trying to spawn units using chat commands. It works for units like footmen and archers but not for heros, why? Heres the code im using:

Code:
Unit - Create 1 (Unit-type((Entered chat string))) for Player 1 (Red) at (Center of TestHeroSpawn <gen>) facing Default building facing degrees
 

Hadezown

TH.net Regular
Reaction score
5
yup, nothing works. i dont get it though it works for buildings lol
anyone have a solution?
 

HappyPeasant

New Member
Reaction score
8
um just basic thinking lol im just getting into var but um

hero = hero :p

unit-type = unit.....

idk just a thought dont have my editor to help get a solution
 

vypur85

Hibernate
Reaction score
803
You may want to post the entire trigger? Anyway, I've tested it, it worked.

Code:
Melee Initialization
    Events
        Player - Player 1 (Red) types a chat message containing <Empty String> as A substring
    Conditions
    Actions
        Unit - Create 1 (Unit-type((Entered chat string))) for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees

For Paladin, just type paladin.
 

Hadezown

TH.net Regular
Reaction score
5
unit-type includes heros and buildings
this is really annoying me i see no reason why it should work for heros
 

Hadezown

TH.net Regular
Reaction score
5
i see what the problem is, i customized the heros and changed their unit names. But it only reads the internal unit name of the hero which cant change. which means no spaces when you type a name. so,

priestessofthemoon
demonhunter

now it works, and i had the same event as that, i thought it was kinda obvious, but thanks
 
General chit-chat
Help Users

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top