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

Army Command Ability

Status
Not open for further replies.
Level 4
Joined
Jan 9, 2006
Messages
54
I made Star Wars Footmen Frenzy and for my new version i would like to add an ability that commands units within range of the hero to atk/move whever the ability was cast. i forget but ive seen this ability before and i cant duplicate it. Help anyone?
 
Level 8
Joined
Nov 20, 2005
Messages
372
You should add a dummy spell..
Like you add berserk with 0 % bonus speed. Its bufftime is 0.01 seconds..

Then make a trigger

Event: A ability is being casted ( or something like this )
Boolream: Ability Being casted equal to *yourabilty*
Event:
Custom Script:Ug_WantDestroyGroup=True
Unitgroup:pick every unit in range of Casting unit and do ( Multiplicate functions )
Order unit to move to *yourrect*
 
Level 24
Joined
Jun 26, 2006
Messages
3,406
dhk's idea should work fine BUT you should probably make it something that does something to an area (like maybe silence), give it an AoE of 1 (not 0 because then you'd need a unit as the focus), a duration of 0, and a cast range of 99999 (which i believe is highest) if you want it to be mapwide
 
Level 4
Joined
Jan 9, 2006
Messages
54
For some reason i cant seem to get the ability to work. I based it off Silence with aoe of 1 duration of 0 casting range of 99999 and heres wat i have for the trigger.

COmmand Troops
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Command Troops
Actions
Unit Group - Pick every unit in (Units within 1000.00 of (Position of (Casting unit))) and do (Actions)
Loop - Actions
Unit - Order (Picked unit) to Attack-Move To (Target point of ability being cast)
 
Level 24
Joined
Jun 26, 2006
Messages
3,406
you may need to use "ability is cast" or whatever it is instead of begins casting ability
otherwise i can't think of what would be wrong, tho i'm sure dhk could magic up a JASS script to do it
 
Level 24
Joined
Jun 26, 2006
Messages
3,406
uh
hmm :?
try all the things that have anything to do with abilities being cast (start, finish, is, etc.)
all i can think of... sorry i can't help more than that :?

on a sadistic note, good luck with that :twisted:
lol jk :wink:
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
what DHK wrote is kinda right, but with a couple mess-ups, ( can be improved, and i dont want to even know what happened to that Custom Script line )

here we go - sped up, fixed, and written with the correct names

Events
Generic Unit Event - A Unit Starts the Effect of an Ability
Conditions
Ability Comparison - Ability Being Cast equal to Command Troops
Actions
Set Variable - Set Loc[0] = Position of Triggering Unit
Set Variable - Set Loc[1] = Target Point of Ability Being Cast
Custom Script - set bj_wantDestroyGroup = true
Unit Group - Pick Every Unit In Group and do Actions = Pick Every Unit in ( Units Within 1000 of Loc[0] ) and do Unit - Issue Order Targeting a Point - Order Picked Unit to move to Loc[1]
Custom Script - call RemoveLocation( Loc[0] )
Custom Script - call RemoveLocation( Loc[1] )

PS. requires an Array variable ( size 1, type Point )

Teh_Ephy - Begins Casting still works, it just suxorz ( oh, and i dont think DHK knows JASS )

TheMoneyLover - Custom Script is the 3rd action from the top of the list ( no category ), and is right under Comment. Also, the reason the script was not working was defenitely NOT the custom script line, as pretty much the only way that a GUI user will ever use JASS is to clean up leaks.
 
Status
Not open for further replies.
Top