• 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.

Can someone help me or make an A.I that automatically replaces dead pre-placed units?

Level 3
Joined
Aug 5, 2024
Messages
8
So I'm making a campaign and most of my time is being taken by terraining and overall designing the map and revisions to make sure its balanced and fun for the player, and I'm not the greatest at triggers i infact am below average at it, and really need help on a custom ai that just tries to replace dead units that it owns, kinda like tryande ai on brothers stormrage but editable for each faction, is it possible or Is there alternatives?

any and all help is appreciated :)
 
Level 30
Joined
Aug 29, 2012
Messages
1,383
Here, you can use this file as a basis. It looks like this

1729415800459.png


The line that interests you is the second one, call SetReplacements(1,2,3), the numbers = the number of times the AI will rebuild a dead unit for easy, medium and hard respectively (in this case, you'd kill a unit 3 times on hard difficulty before it gives up rebuilding it)

You can modify the file with notepad or JassCraft (recommended)
 

Attachments

  • Example.ai
    498 bytes · Views: 4
Level 3
Joined
Aug 5, 2024
Messages
8
Here, you can use this file as a basis. It looks like this

View attachment 492541

The line that interests you is the second one, call SetReplacements(1,2,3), the numbers = the number of times the AI will rebuild a dead unit for easy, medium and hard respectively (in this case, you'd kill a unit 3 times on hard difficulty before it gives up rebuilding it)

You can modify the file with notepad or JassCraft (recommended)
thanks time to bruteforce/figure out how this works, Maybe I can now add variable difficulty for allies and enemies hehe
 
Top