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

GUI Castle Fight

Status
Not open for further replies.
Level 7
Joined
Jan 17, 2019
Messages
163
Been in the mood to start a new project. It's pretty much going to be like Castle Fight except you decide which AI controlled bosses will defend instead of a castle. I'm still deciding on how I want to trigger this. Castle Fight summons units for the actual player that cannot be controlled, anyone know if that is possible in gui? Also what kind of trigger set up do you think is best to make the units with spells automatically cast them on enemies when available?

My last map was a 4v4, spent over a year on it and the amount of lobbies I've given up on is painful. Not making that mistake again, this will be a 1v1 since I don't think wc3 is gonna be populated in a year.
 
Level 7
Joined
Jan 17, 2019
Messages
163
"In Castle Fight the units have the "Ward" Classification which blacks out the command card. They can still receive move and attack orders via right click. In Castle Fight when a unit is ordered to do "smart" the unit is simply told to stop and reordered to attack move to the opposing Castle."

Now we are talkin. Time to experiment with this "ward" classification. That explains why you can kind of make units wiggle a bit by spamming movement in castle fight.
 
Level 5
Joined
Oct 16, 2007
Messages
67
You can also use hide ability for move, attack and stop. You can't order units via Mouse or Trigger during that time, however the abilitys still work.
So unhiding attack ability, triggering the order to attack move and then hiding it again will make the unit do the normal attack move but the player can't change the target. And since move is hidden the Player can't give move orders either (neither right click nor shortcuts will work). However it might give you Problems with autocat abilitys, I didn't test that.
 
Level 7
Joined
Jan 17, 2019
Messages
163
To the person reading this in the future who has been screaming at their monitor for an hour I bring you the solution. It works flawlessly. Units completely ignore the player but can cast spells, collect bounties and still be selectable to see their stats.

Give the unit the Ward classification then use this:

  • Cancel Command
    • Events
      • Unit - A unit owned by Player 1 (Red) Is issued an order targeting an object
      • Unit - A unit owned by Player 1 (Red) Is issued an order targeting a point
      • Unit - A unit owned by Player 1 (Red) Is issued an order with no target
    • Conditions
      • (String((Issued order))) Not equal to (Whatever Casting Ability the Unit Uses) -YOU CAN FIND THE STRING IN THE ABILITY EDITOR. JUST TYPE IT INTO VALUE.
      • (Unit-type of (Ordered unit)) Not equal to (Units you want to be controllable)
    • Actions
      • Trigger - Turn off (This trigger) -WITHOUT THIS THE GAME WILL CRASH DUE TO INFINITE LOOP-
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Ordered unit)) Equal to Player 1 (Red)
        • Then - Actions
          • Unit - Order (Ordered unit) to Attack-Move To (Center of Region 016 <gen>)
        • Else - Actions
      • Trigger - Turn on (This trigger)
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,561
Can you share a shop map wide? I thought there was a limit for range
So the ability is actually called: Shop Sharing, Allied Bldg.

Anyway, i'm not really sure what you're asking.

Add the ability to an allied unit and you'll see what i'm talking about. Make sure to set the Interaction Type to None and Show Buttons to False.

Also, I found that you're still able to use the unit's abilities, you just can't issue attack/move orders. I remembered it working differently, maybe there's a way to get it to work so it excludes control completely.

There's ways to trigger around this problem (like making the abilities passive and triggering their effects), but I assume if you're working in GUI you'd rather keep it as simple as possible.
 
Last edited:
Level 7
Joined
Jan 17, 2019
Messages
163
Right now I just use triggers that detect if a unit is attacking/attacked and tell that unit to cast the spell on it's target/attacker. Since their mana is also their cooldown they can only cast when ready. Works pretty well. One thing I have to say is my little trigger up there is somehow SMOOTHER than castle fight. Castle fight you can sorta change the units direction for a milisecond when you right click, with this it's completely ignored. Or maybe that is just a latency thing and the only reason it is so smooth is because I'm testing alone.
 
Status
Not open for further replies.
Top