• 🏆 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!

Starting units, heroes and AI problems.

Status
Not open for further replies.
Level 7
Joined
Dec 28, 2009
Messages
257
Gday my fella, it is i again.

Im sort of bored so i decided to make a map with classic 4 Outland races (naga, blood elves, fel orcs and dranai) with all classic units
(yea, 5 dranai units :D)

Thats fine, but i would like to ask: How can i change starting units for races? or, if this isnt possible- how can i make it that if players chooses races as human, he will get blood elf units and stuff.

Second, the heroes. I have altar that summons heroes, but it can summon INFINITE amount, just like normal units (well, i can revive them). how can i make itas in normal game? i added requirements and tiers stuff, and i still dunno why it dont work.

And third: i want to make new AI, but i dunno how to create one- i know AI editor, but i would like to see some AI for any race (lets say human) so ill just change units, building and stuff. or just some GOOD tutorial, not only this is this and make it yourself.

Thanks for help, and hope you understand my english.
 
  • Trigger1
  • Events
    • Map Initialization
  • Conditions
  • Actions
    • Player Group - Pick every player in (All players) and do (Actions)
      • Loop - Actions
        • If (All conditions are true) then do (Actions) else do (Actions)
          • If - Conditions
            • (Race of (Picked player)) Equal to Human
          • Then - Actions
            • Set Temp_Group = (Units owned by (Picked player) matching ((Matching unit) is a peon-type unit) Equal to True)
            • Unit Group - Pick every unit in (Temp_Group) and do (Actions)
              • Loop - Actions
                • Unit - Replace (Picked unit) with a Blood Elf Worker, using the new unit's life and mana
            • Custom script: call DestroyGroup (udg_Temp_Group)
          • Else - Actions
2)
  • Player - Limit training of heroes to 3 for (Picked player)
You also need to go to Gameplay Constants, scroll to Techtree - Depedency Equivalents - Hero and add your custom hero to the heroes.

3) http://www.wc3c.net/showthread.php?t=87999/
 
Level 7
Joined
Dec 28, 2009
Messages
257
Thanks!
first one works, but Undead start with 3 acolytes instead of 5 laborers, how can i change this?

second, it works. i quess it was only some bug because i used hero like Kale or Sylvanas, and they are different from normal ones (try and see)

and third- it looks so complicated that il study it later.
 
Then in the Unit Group I described,
  • If (All conditions are true) then do (Actions) else do (Actions)
  • If - Conditions
    • (Race of (Picked player)) Equal to Undead
  • Then - Actions
    • Set Temp_Group = (Units owned by (Picked player) matching ((Matching unit) is a peon-type unit) Equal to True)
    • Unit Group - Pick every unit in (Temp_Group) and do (Actions)
      • Loop - Actions
        • Custom script: set udg_X = GetUnitX (GetEnumUnit())
        • Custom script: set udg_Y = GetUnitY (GetEnumUnit())
        • Unit - Kill (Picked unit)
        • Unit - Remove (Picked unit) from the game
        • Custom script: call CreateUnit (GetEnumPlayer(), 'hoho', udg_X, udg_Y, 270)
    • Custom script: call DestroyGroup (udg_Temp_Group)
  • Else - Actions
You will need two variables: X and Y. Both are reals. 'hoho' is the Unit id to create. To check your unit's id, go to Object Editor, Units Tab and press Ctrl + D or by the View Menu -> Display values as raw object data. Once you find your unit, memorize its id, e.g. h000. Then replace that "hoho" with "h000" (Leave ' ' as is. E.g. 'h000').

To remove the default Ghoul, add an "And" in the comparisons of the Unit Group pick (Unit-type of (Matching unit)) Equal to Ghoul.
 
Status
Not open for further replies.
Top