• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Solved] Custom Race System Bugs

Status
Not open for further replies.
Okay,I got another question.I created my own custom race jass script and to play it,I must use 90% handicap with undead race.But,it doesn't seems to be working (for me at least).Even though I use 90% handicap when testing choosing undead,both undead race and my own race show up.And my worker .NEAR HALL spawn in the middle of the map.

Here's the jass codes:
JASS:
library DarklingSetup initializer Init requires CustomRaceSystem

    private function Init takes nothing returns nothing
        local CustomRace c = CustomRace.create("Darkling",RACE_UNDEAD,0.9)
        call c.setTownHall('u007')                  // Chaos Fortress
        call c.addWorkerType('e002',c.NEAR_MINE,4)  // Lost Soul
        call c.addWorkerType('u00F',c.NEAR_HALL,1)  // Extractor
        call c.addHeroType('U00E')                  // Empath
        call c.addHeroType('H000')                  // Council Overlord
        call c.addHeroType('U00O')                  // Soulmonger
        call c.addHeroType('H001')                  // Night Assasin
        call c.setAIScript("undead.ai")
    endfunction
    
endlibrary
 
Level 12
Joined
Dec 25, 2010
Messages
972
Okay,I got another question.I created my own custom race jass script and to play it,I must use 90% handicap with undead race.But,it doesn't seems to be working (for me at least).Even though I use 90% handicap when testing choosing undead,both undead race and my own race show up.And my worker .NEAR HALL spawn in the middle of the map.

Here's the jass codes:
JASS:
library DarklingSetup initializer Init requires CustomRaceSystem

    private function Init takes nothing returns nothing
        local CustomRace c = CustomRace.create("Darkling",RACE_UNDEAD,0.9)
        call c.setTownHall('u007')                  // Chaos Fortress
        call c.addWorkerType('e002',c.NEAR_MINE,4)  // Lost Soul
        call c.addWorkerType('u00F',c.NEAR_HALL,1)  // Extractor
        call c.addHeroType('U00E')                  // Empath
        call c.addHeroType('H000')                  // Council Overlord
        call c.addHeroType('U00O')                  // Soulmonger
        call c.addHeroType('H001')                  // Night Assasin
        call c.setAIScript("undead.ai")
    endfunction
    
endlibrary

Modify the Undead version script to fix everything
 
Status
Not open for further replies.
Top