check if building is training a unit?

rescue-hero

New Member
Reaction score
1
rescue-hero said:
unitname: 001 wood
unittype: custom_ h001

thats the problem, it isnt :(

and in my opinion there have to be a connection, otherwise there wouldnt stand 001 wood is trained...
and in the object editor it isnt a specific unit too, its the unittyp and i declare the name 001 wood...

BUT IT ISNT :(:(
:nuts::banghead:

edit:
try this EASY example on your own...
if you use footman as standard unit, you gain footman as unittype, doesnt matter what you will write into the box for the name in the object editor...

just use the normal casern (think its called so)

event:
a unit starts training a unit

condition:

action:
show string(unittype(unittype of trained unit)) to all players
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
its a barrack.

and the string "custom_h001" is the raw-code order string of your unit type.

whenever you create an object in the editor it will get a raw code. this code is a big big number.
every unit, destructible, item, upgrade, whatever got its own individual raw code.

the raw code of your unit is h001, that means it was the second unit you made upon a copy of a human unit.

what you get when morphing the unit type into a string is the current order of the building. there aint an order like "train" or "build", when ordering a unit to train / build / upgrade into something the order string will be set to a string according to the raw code of the unit type.

for all the premade wc3 standard units there are specific order strings available, however each custom made units order string will be "custom_<RAW-Code>".

to view the raw code of your units you have to open the object editor and press CTRL+D.
 

rescue-hero

New Member
Reaction score
1
ok, the i knew the first lines already, but i will try the last line...

so its impossible to get the UNITname, only the sourcecodename of the unittype?
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
click the [Edit] button and then there should be 4 buttons at the bottom, in order:
[Save] [Go Advanced] [Delete] [Cancel]

i guess its obvious which to click.
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
well if you urge this hard to get the name of the unit out of the unit type just create some dummy unit of that unit type and get its name then remove it immediately... wheres the problem?
 

rescue-hero

New Member
Reaction score
1
thats an idea, but i would place them already in the editor...
with a barrier, that nobody can comes to them, like in bscf ;)
or i make them invisible and stack them on eachother...
i will see...

THANKS for this easy solution, will prove if it will work =)))
think so

i was just thinking too complex^^
 

rescue-hero

New Member
Reaction score
1
sry, have sth with the trigger is wrong, ive no problem yet^^

edit:
problem fixed with the trigger, theres no problem !

solution works!!!
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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