• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Using raw data for custom units in JASS (help)

Status
Not open for further replies.
Level 2
Joined
Jul 8, 2017
Messages
17
Hi guys,

Is there a special way of writing out raw codes of custom units when using them for campaign AI scripts in JASS for some commands such as "call SetBuildUnitEx(___) and 'call CampaignAttackerEx(___)?

I've determined that the reason why my (first) script wouldn't work is because I'm either calling the raw ID incorrectly, or that the script itself is not able to associate it with the custom unit, yet it recognises melee unit IDs just fine, which I find odd.

For example, this:

Code:
//Building Order
    call SetReplacements(1,2,3)
    call SetBuildUnitEx(1,1,1,'unpl')
    call SetBuildUnit(5,'uaco')
    call SetBuildUnit(1,'ugol')
    call SetBuildUnitEx(1,2,3,'uzig')
    call SetBuildUnitEx(1,2,3,'usep')

works fine and the Acolyte will build the Crypt, but this (after giving the Acolyte the ability to make the custom unit of the Portal):

Code:
//Building Order
    call SetReplacements(1,2,3)
    call SetBuildUnitEx(1,1,1,'unpl')
    call SetBuildUnit(5,'uaco')
    call SetBuildUnit(1,'ugol')
    call SetBuildUnitEx(1,2,3,'uzig')
    call SetBuildUnitEx(1,2,3,'usep')
    call SetBuildUnitEx(1,2,3,'h00K')// <---- Problem here

does not. I'm hard-pressed as to how I'm supposed to write them out.
 
Level 2
Joined
Jul 8, 2017
Messages
17
I recommend using a Syntax Checker to check it. Make sure the ID is correct and the unit can train the said portal.

Syntax Checker returns no errors. I wouldn't think it would cause an error anyway given that it's a copy-paste of the line above it with the ID changed.

The unit is able to train the portal. This is something I always check first for any errors.

The raw code for the portal is given by h00K:hbar. Do I use h00K or hbar? If it's the former, it would not work.
 
Level 2
Joined
Jul 8, 2017
Messages
17
Yes. It was based off the High Elven Barracks from the Human Campaign if I remember correctly.

EDIT: Nope, it was based off the regular Barracks.
 
Status
Not open for further replies.
Top