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

Simple, Easy, Noob Questions (On AI, Weather, and Heroes)

Status
Not open for further replies.
Level 5
Joined
Feb 27, 2009
Messages
115
Have you ever had that feeling that you know there is a simple, easy fix to your problems but, for some reason, it never comes to you? And you end up going in circles in the editor? And while I suspect my questions are somewhere in the archives, I haven't been able to find them.

So maybe you guys can help me out. I have three issues I need solved. They seem simple enough, but I can't get them to work.

1) AI

My enemy spawns on the map and attacks a certain location. The triggers I have used to do this are something like:

-Create units at X location.
-Order all units at X location belonging to Player 3 to attack a random point in Region Y.

This works OK for a little while. However, not all the units that spawn will attack. They will just sit there. Sometimes, units from previous waves decide to 'pop up' from waves later!

I never had this issue in Starcraft. In Starcraft, you could just set the AI to be 'Berserk' and no matter where a unit appeared, it would attack and keep attacking. Is there some equivalent in Warcraft 3? If there is, I haven't been able to find it.

My spawned units are not consistently attacking.

2) Changing the Weather


God, I feel like such a noob, but I cannot seem to change the weather. This is what I have:

EVENT: The in-game time becomes 6:00.

CONDITIONS: (no conditions)

ACTION: Environment: Create at [Playable Map Area] the weather effect of Rain.

Environment: Turn on (last created weather effect).


Everywhere I read it, it shows a trigger like this. Yet, I can never get it to work.

3) Heroes

I have custom heroes added on melee gameplay. So it is regular Blizzard heroes plus new custom ones.

The Blizzard heroes are all working fine.

However, the custom heroes are fouling up on the altar. If you pick a Blizzard hero, it is gone from the list as it should be. But if you pick a custom hero, the custom hero is still available on the list!

(Once three heroes are picked, altar becomes blank as it should be. This issue only appears at tier 2 and tier 3 altar).

I've tried limiting the custom heroes to 1 as supply. But still, you can buy more of them! I do not understand. Anyone know what the issue is with this?
 
Level 4
Joined
Apr 25, 2008
Messages
75
Okay, the first thing I do to solve trigger problems that I don't know right off the bat is to pretend I haven't read your way and write it from scratch from what seems logical to me. I managed to make it work on my first try, and turn it off after a bit of tweaking for my 2nd try!


  • weather
    • Events
      • Player - Player 1 (Red) types a chat message containing -w as An exact match
    • Conditions
    • Actions
      • Environment - Create at Region 000 <gen> the weather effect Ashenvale Rain (Heavy)
      • Set Rain = (Last created weather effect)
      • Environment - Turn Rain On
  • weather2
    • Events
      • Player - Player 1 (Red) types a chat message containing -woff as An exact match
    • Conditions
    • Actions
      • Environment - Remove Rain
      • Environment - Turn Rain Off
Haven't tried it with "Time Elapsed" as the event yet but I guess it should work, I am attempting the other problems right now.

EDIT1: Okay just tested it with "Time Elapsed: 10 Seconds" as Event and it works!

EDIT2: Had a look at the Object Editor and saw a couple of values that stand out. Go to your Custom Heroes and change this to the same as the Blizzard-made Heroes and see if it works:
Techtree - Requirements - Tier 2
Techtree - Requirements - Tier 3 (etc all the way to how ever many tiers you have)
Techtree - Requirements - Tiers Used

Tell me what happens.

EDIT3: Okay about your first problem:
I'm not really sure from the details your giving me. But from the little I know about leaks I can you right off that that leaks. The Random Point in Region Y should be saved to a variable and deleted or something like that. Maybe that's why it works at start but after a while gets buggy then probably sooner it will crash. Also, if you are using "Periodic Event - Every x Seconds of the Game" as Event I think that leaks too but I would make that a recurring Countdown Timer. Make sure you are using "Attack Move" which would seem more logical. And lastly maybe just simplify it by doing "Order (Last Created Unit) to (Attack Move) to Random Point in Region Y" or something like that.
 
Level 5
Joined
Mar 17, 2005
Messages
135
3) Heroes

I have custom heroes added on melee gameplay. So it is regular Blizzard heroes plus new custom ones.

The Blizzard heroes are all working fine.

However, the custom heroes are fouling up on the altar. If you pick a Blizzard hero, it is gone from the list as it should be. But if you pick a custom hero, the custom hero is still available on the list!

(Once three heroes are picked, altar becomes blank as it should be. This issue only appears at tier 2 and tier 3 altar).

I've tried limiting the custom heroes to 1 as supply. But still, you can buy more of them! I do not understand. Anyone know what the issue is with this?


It's because of this melee map trigger.
  • Melee Game - Limit Heroes to 1 per Hero-type (for all players)
I can show you how to do it using your own triggers.

  • Create Hero
    • Events
      • Unit - A unit Finishes an upgrade
    • Conditions
      • (Unit-type of (Researching unit)) Equal to Altar of Kings
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • If ((Researched tech-type) Equal to Iron Forged Swords) then do (Unit - Create 1 Footman for (Picked player) at (Position of (Researching unit)) facing Default building facing degrees) else do (Do nothing)
This is the best way I could come up with. Create an upgrade that will have the same icon as the hero, with the same exact tooltips but does not do anything and give it 1 level. Remove all effects from the upgrade. Place that upgrade into the altar and remove the hero. Whenever someone upgrade lets say "Archmage" the ability will go away because it has 1 level thus removing the "hero" and the trigger will create the hero of your choice.

Hope this helps. If you have a question let me know.
 
Level 4
Joined
Nov 22, 2008
Messages
57
Don't forget to make sure the hero can be revived!!!! That could cause some very bad problems!

And:
When your map is done, please PM me. I am always interested in new maps.
 
Level 5
Joined
Feb 27, 2009
Messages
115
Sorry for the delay in response. I've been busy over Labor Day.

Toilet Maker, you fixed my weather problem. Can't believe I didn't know about the variable. No wonder I had such problems getting it to work.

As for the enemy armies spawning and attacking, I have had some success with this. I've been able to get the one time elapsed to work perfectly now. However, I still have some trouble with the periodic spawns. They still tend to bunch up. I likely have too many units spawning.

What I am finding out is that when units are ordered to move from a location, only a few units move at a time. If those units are trapped inside other units, they just sit there or keep trying to move. In the end, the collective body just sits there.

The only real problem I have left is that custom heroes, when picked from the altar, do not leave the altar no matter what stats I assign to the hero (no matter what that unit's limit is and all). At least this issue isn't "game breaking" as the unit spawn problem was.

Palermo, I will try to do what you say. It is odd that something as basic as custom heroes doesn't react the same as regular heroes. I suppose this is why I so rarely see melee type maps with custom heroes coming from altars!
 
Level 4
Joined
Apr 25, 2008
Messages
75
Mr.Cheese said:
What I am finding out is that when units are ordered to move from a location, only a few units move at a time. If those units are trapped inside other units, they just sit there or keep trying to move. In the end, the collective body just sits there.

You can spawn them in formation:
  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) types a chat message containing - as An exact match
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 5, do (Actions)
        • Loop - Actions
          • For each (Integer B) from 1 to 5, do (Actions)
            • Loop - Actions
              • Unit - Create 1 Footman for Player 1 (Red) at ((Center of (Playable map area)) offset by ((100.00 x (Real((Integer A)))), (100.00 x (Real((Integer B)))))) facing Default building facing degrees
This spawns 25 footies in a square formation (5 rows, 5 colums).
The magic here is the For Loop of Integer A/B working with the offset. The offset just means that it will spawn a X units away from specified point but the For Loop stops you from having to manually do 25 actions. It will keep looping the action changing Integer A/B with an incrementally increasing value thus increasing the offset, giving you a result of spread out units.
 
Level 5
Joined
Feb 27, 2009
Messages
115
A lot of people don't make custom melee maps where they create custom heros. For one, they are not very fun generally and it's hard to get custom players to actually play a melee game.

I'm not surprised by this. I've been really into Starcraft editing and (now) Warcraft 3 editing. Warcraft 3 is much more difficult performing macro gameplay especially in regard to armies. But Warcraft 3 excels in the micro. It is very simple and fun to make new spells and new heroes. But it is more difficult to get people play in a more melee orientated (i.e. with controlling large armies) in Warcraft 3. The games are just designed so much differently. This is also why I suspect DOTA will not be as big as people think on Starcraft 2. Starcraft gameplay isn't 'hero centric' as Warcraft has been (War 2 -> War 3 -> World of Warcraft).

I think my type of my map will be successful since it is still played with classic Starcraft. Anyway, at least it will be different from all the other Arena of Strife or RPG maps coming out.

Anyhow, Palermo, I do need help with that trigger on how to make that custom hero appear from the altar while vanishing from the list.

I understand how to make an upgrade into the altar and it matching the hero portrait and all. But I do not understand the trigger to make the hero appear at that altar. Will it use the altar's rally point? Is it just 'have altar build Custom Hero' after the upgrade has been chosen?

Thanks Toilet Maker. I'll try putting to work the trigger you showed me.
 
Level 5
Joined
Mar 17, 2005
Messages
135
Yes it will create the unit at the altar. To add the rally point feature, add this to the bottom of the trigger as well. Your going to change that research iron swords to your upgrade that looks like the hero.

  • Unit - Order (Last created unit) to Move To (Rally-Point of (Researching unit) as a point)
And I just thought of something else, it will need to have a town portal created as well so add this trigger too.
  • Hero - Create Scroll of Town Portal and give it to (Last created unit)
Let me know how this works out for you. If you have any more question let me know.
 
Level 6
Joined
May 1, 2009
Messages
215
Toilet Maker's most recent trigger will cause quite a bit of lag without the leak scripts so read about those.

Also, to remove the "collective body sits there" problem, max line of sight, lower collision size, and increase acquisition range. Also, anti-stuck towers can sometimes motivate things to move, though I don't really find them that useful.
 
Status
Not open for further replies.
Top