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

Creating an Attack Through Ability.

Status
Not open for further replies.
Level 5
Joined
Jun 8, 2009
Messages
101
Hello, I'm new to the Sc2 Editor and as amazing as it is im having hard time figuring this one out from blizzard.

I want to create an ability, through itself or a trigger that will replace the Normal 'Rightclick toattack' gameplay to hitting Attack will cause the unit to swing his weapon and deal damage + any other additional effects if present.

Does anyone have any idea where to start?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
Yes, remove the normal attack buttons from the unit's command card. Next remove its weapon (as weapons are reponsible for the automatic targeting and attacking system). Finally just make an ability with the appropiate effect chain to do what you want (remember to give it a button in the units command card).

For a variety of different effects you can use behaviours that run effects whenever the unit does damage. For more advanced effect logic, you can use script enhanced effects (but hooking a trigger to run script every time a specific effect is used).
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
Make a trigger that recognizes when that weapon is used, and issue the unit to cast an ability.
If that's what you want, at least. Based on the thread topic, I got the idea it is what you want

This is like running a gamecube emulator to run a N64 emulator... Why not just do it directly? Abilities run effects but so do weapons when they fire. Just get the weapon to run the effect and cut out the ability and trigger script (saving considerable time).
 
Level 5
Joined
Jun 8, 2009
Messages
101
Base the ability on an instant cast ability. Use a search effect to find valid targets and then damage them.


I Created a new ability, Named it Attack, Suggest Id, Based it off of instant ability and set default.


So, Im on table view, and that is all ive got, im not understanding how to make this ability cast off a hotkey -_-

Is there anyway to set it up with a similar UI fashion of world editor?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
So, Im on table view, and that is all ive got, im not understanding how to make this ability cast off a hotkey -_-
The hotkey an ability uses is declared in the accompanying button catalog entry you created for it. This button and the ability get mapped together in the command card fields for a unit catalog entry (the unit you want to use the ability). This way you can give the same ability different hotkeys for different units. You also do not need to always give a button an ability (in the case of passives that you just want to inform the user about).

Is there anyway to set it up with a similar UI fashion of world editor?
No because that just made no sense.
 
Status
Not open for further replies.
Top