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

spell request (or just teach)

Status
Not open for further replies.
Level 10
Joined
Jul 2, 2004
Messages
690
Level 1: shoots 2 arrows at 400% attack speed. each arrow dealing 90% damage.each level adds 10% more damage to each arrows.
also, how do you make for example when you click a unit, it appears to be yours, but the control buttons (bottom right, move, attack, spells, etc) and all taken out. its like clicking an allied unit but the selection scale is green.
 
Level 3
Joined
Oct 9, 2004
Messages
26
For your last question - the selection one:

There are 2 ways

First way - this one is advanced. Download Vexorians Hero Selection system (a spell) - it does exactly what you said!

If this fails for you - I made 2 simple triggers:

VARIABLES: Name: Selected. Type: Unit(array)
The array is for the players e.g. Selected(1) would be player 1, selected(2) would be player 2.

Trigger 1: Change ownership of selected unit

E:player(x) selects a unit
C: Unit is owned by (neutral passive or w/e)
(top condition is for security - to make sure selected unit is who you want it to be)
A: Change ownership of triggering unit to triggering player
A: Set SELECTED(Player number of triggering player) = triggering unit - important for next triggers

Trigger 2: Checks to see if unit is selected,

E: Every 0.05 seconds

The below action using (integer A) is a way of checking through each player. If the map was a 6 player map, (integer A) would count as 1,2,3,4,5,6.

A: For each (integer A) from 1-(how many players there are) loop actions:
If(conditions): SELECTED(integer A) is in units currently selected by player (integer A) - This condition is a boolean: Unit is in unit group
Then: do nothing
Else: Change ownership of SELECTED(integer A) to (Neutral Passive or w/e)



Depending on what your map's purposes are, there are other triggers to be added aswell. E.g. if you don't want the player to steal the unit and be able to control it (just ask if you want that) or if you want the player to see the unit's skills. ETC. Just give me the specific curcimstances of the map and i will tell you more modifications!
 
Level 10
Joined
Jul 2, 2004
Messages
690
actually those 2 were kinda linked... when you cast the spell then yoour unit goes "out of control" and it shoots the arrows
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
About the first one, detecting damage is impossible, unless you start to detect everytime the ranger attacks once she gets the ability. And even so, there is a chance that the skill will fail. So I say that detecting damage part unless you change the system of the spell is impossible.

~Daelin
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
I know about that event. Its BASIC. But unfortunately in this case it wouldn't be of any help since the archer doesn't really attack into this spell. You should be able to do damage when the dummy arrows reach their target but... In this case you would need to know the damage when the archer starts casting the ability.

~Daelin
 
Level 2
Joined
Apr 27, 2005
Messages
12
I don't think this would work, but I hope this can give you some idea.

I'm not an expert with this stuff so if it creates leaks or doesn't work I just don't know. This is just pseudo.

Store damage
-Events
A [unit] Takes damage
-Conditions
-Actions
If Then Else
If
[Game cache doesn't exist]
Then
Create game cache from blah.w3v
[In here, you set a variable damage with the value of GetEventDamage()]
Turn on doublestrafe
Else
[Delete damage, then create another damage with the same value. Or just set damage to GetEventDamage()]

doublestrafe
-Events
A [unit] Begins casting an ability
-Conditions
Ability being cast = your skill
-Actions
[In here, you load the Game Cache variable "damage", and you order the hero to attack target unit of ability being cast for (damage * .9), wait _ seconds, then order it to attack again. Remember to pause the unit before he attacks, else he could attack in the middle of order 1 and order 2.]

I really have no guarantee that this will work, but at least I gave you some idea. Although this requires the hero to attack someone first...

Just trying to help.
 
Status
Not open for further replies.
Top