• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Looking for help with. Jass Code or Trigger editor.

Status
Not open for further replies.
Level 19
Joined
Aug 1, 2022
Messages
238
Hello, I'm seeking help with improving my JASS AI, specifically in relation to rebuilding the town hall/commander center (castle). I've been facing an issue where the AI doesn't rebuild their main building when it's destroyed. I attempted several fixes, but noticed that the AI will only rebuild the castle if a town hall is already present in the JASS code.

Initially, I tried using the unit code for the town hall, and the AI immediately started building that custom town hall, even though their main castle was still active. However, when I removed this town hall code, the AI wouldn't build a new one after the castle was destroyed.

What I need is a JASS code that checks if a specific custom building (the castle) is either equal to 0 or less than 1, and if so, orders a custom worker unit to immediately build the custom town hall.

Can anyone help with a conditional structure in JASS to check for this and trigger the rebuilding process?
 
Welp I tried it it didn't work as it intended though... The good news is that Jass demo didnt find any errors, but is there any other additions to this code you have provided?
 
Status
Not open for further replies.
Back
Top