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

Need some help please.

Status
Not open for further replies.
Level 1
Joined
Aug 2, 2010
Messages
4
So I am making a Rpg type map for me and my friends, and I am working on my first hero and i have a problem.

I made a cloaking ability and i want it to decloak on attack.
Ex: Hero cloaks> attacks> Decloaks

That way my hero can't just attack from stealth the whole time.

I also want to remove the mana per second cost on it.

Found another problem I Want to make it so Players can't A>Attack allied units. I know in warcraft i used triggers for a unit is attacked if attacking unit is allied ect ect but i can not seem to figure it out in SC2.

Thank you for your help!
 
Level 4
Joined
Jul 4, 2009
Messages
77
To prevent allied attacks WITHOUT TRIGGERS you would alter WEAPONS under the WEAPON - TARGET FILTERS field and remove ALLY, PLAYER from the filters.

This gives the message "Can not attack allied units" when you try and force A hotkey attack.

Yes. you will have to change EVERY weapon in your map.

This seems simpler and have LESS memory use than trying to call a trigger EVERY time someone targets someone.

(Note : I checked the ATTACK Ability, and ally and nuetral are already excluded, and this seems to not effect the players ability to FORCE attack things. So changind the weapons seems to be the only way to do it.)
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,255
When the ability is turned on, change the weapon of the hero for a cloaked attack weapon. This does the exact same damage and reload but has an added effect to the chain. It now adds a decloak behaviour to the unit or remoes the cloaking one for a brief period.
 
Level 1
Joined
Aug 2, 2010
Messages
4
Thank you I didn't know you had to change it on the weapon that worked.

So i tried making a new weapon and i equiped it to my hero, and then i made it so that when he activated cloak, it would disable his main weapon and enable his second, and that works fine. Tested it by changing the damage of the other weapon. What i can't figure out is how to make it decloak.

I tried making an effect that call the cloak behavior but then i have to remove the damage effect because you can only have 1. Haven't been able to figure this out.

Some one on another forum said to use validators and i haven't been able to get that to work either. So if some one could give me a step by step run down that would be greatly appreciated.

I also need a tutorial on Dialog buttons I want to make a shop with dialogs but i can't get it to run specific triggers for specific buttons pressed, Right now it runs 1 trigger when any button is pressed regardless.

Thanks to everyone that has helped so far!
 
Level 2
Joined
Aug 2, 2010
Messages
17
For your weapon (or w/e triggers the damage effect), instead of having it trigger a damage effect, have it trigger a "set" effect. To create one, just open up the effects tab, right-click, select new object, and in the drop down box select "Set". The "set" effect essentially will trigger all the effects you dump into it sequentially, so you can have your set effect trigger both your damage and your decloak effect.

You COULD use validators to remove the cloak behavior, but only on attack or during certain sequences of the unit's firing animation. Since unit attack events trigger slightly before the unit actually does any damage, it's actually possible to order a unit to attack and then quickly order it to stop, causing your unit to decloak but not actually attack. This may or may not be what you want. If it is, just go to your cloak behavior, scroll down to the box called "Validators - Remove", and add the correct validator. Note here - the behavior will be removed if the validator FAILS its check. (If you're wondering wut "Validators - Disable" does, it disables instead of removes the behavior if the validator fails; the behavior stays on the unit, but all of its effects will no longer be applied until the validator can pass its check again.)
 
Status
Not open for further replies.
Top