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

charm arrow spell request

Status
Not open for further replies.
Level 4
Joined
May 1, 2004
Messages
59
can somone plz make me an arrow based(auto-cast)spell for my dark ranger? it works like that:

when charm arrow is actived,it gives the dark ranger bonus damage and a percentage of chance to charm an enemy undead unit.
e.g level 1 - 20%
level 2 - 40%
level 3 - 60%
can not charm units that r above level 5 or r hero.
 
Level 13
Joined
Dec 29, 2004
Messages
597
Ok, just try this, actually i haven't try this coz i'm at my college's lab by now and of course wc3 are not installed.

First, modify the black arrow, number of summoned unit = 0.

Second, create dummy unit that has charm ability.

Then you make a trigger so:

Events:
Unit start the effect of an ability
Conditions:
Ability being cast equal to charm arrow
Actions:
If Random number from 1 to 100 less than or equal to 20 and target unit equal to undead then:
Create Dummy unit.
Order it to charm target unit.
add 1 second expiration timer to that dummy.

The bold one is to make the spell has a 20% chance, so you can edit it as you like.
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
Wrong... Because this will work only when the player specifically casts the arrow (not autocast). To make it actually work, you would need to detect when the unit activates the autocast, and then start a trigger which activates each time the unit attacks a valid target of the arrow and its mana points are enough to cast the spell. Its pretty confusing but I do not really have time now for requests.

~Daelin
 
Level 4
Joined
May 1, 2004
Messages
59
ye...i know itz kinda complicated, i juz want to know how to make the 'percentage of chance' thing works on an autocast spell...

BUT it will b much more appreciated if somone can take dis challenge :eek: ...
 
Level 4
Joined
May 1, 2004
Messages
59
hey, i was thinking about doin it in dis way:

base on searing arrow,
Trigger A) when arrow is activated,
add 'bash' to 'dark ranger'(needs a variable here),
when arrow is deactivated,
remove 'bash' from 'dark ranger'

(bash: make a passive spell base on bash with modified name and duration. nd a bash buff with a changed name)

Trigger B)
event - not sure yet
condition - unit has buff 'bash' = true
action - change the owner of triggering unit to the owner of 'dark ranger'

howz that :wink: ? gonna work? i havn't try this yet, coz i'm not sure how to detect an auto-cast spell is on or off.
 
Level 10
Joined
Apr 9, 2004
Messages
502
I'm not sure but could you JASS something along these lines


Unit takes damage

Damage source = you're hero

random real number between X and Y greater than Z%.

Create 1 unit with timer and order it to cats the charm on the unit. If unit is too high it won't work anyways so this should work i think. But what's the custom text for a generic unit taking damage.
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
You are wrong here. Because Unit Takes damage works only for a specific unit. It would be unit is attacked indeed, wait the number of seconds with the formula between the two points, to calculate the time you need to wait. But the problem here is that you have no idea if the spell is or not autocast. But yes cazat, your idea sounds good. A passive with no icon and no bonuses would be indicated. Then you can do the stuff I mentioned upper. I'll expand it if you still don't get it.

~Daelin
 
Level 4
Joined
May 1, 2004
Messages
59
'the spell u mentioned upper', u mean in ur first post or second post?
in my trigger A(adding 'bash'), i juz realize therez no function that would detect auto-cast...or is it just 'a unit starts an effect of an ability'?
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
Of course it doesn't and no, the unit begins the effect wouldn't work. But instead, you could use the "An Unit is issued an order with no target" and use the autocast for your ability. So you could just try to detect that, and once the unit autocasts the ability, you can of course give the unit the "bash" ability. But I would suggest another ability such as armor bonus (of course, with no armor) because it doesn't reveal any button. So, then everytime the unit attacks you can check if it has the ability. If the unit has the ability, you can the spell. If not, nothing happens.

To disable the autocast, you again check for the unautocast order and then you remove the ability. You came with the main idea, and I'm really impressed. I think I will do an arrow template later. I'm kinda sick of modelling. ;)

~Daelin
 
Status
Not open for further replies.
Top