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

[Solved] Creating a spell

Status
Not open for further replies.
Level 1
Joined
Jan 11, 2016
Messages
7
Hi!
I'm new on this forum but i'm modding in warcraft editor since few years.

Now to point: I want to create some spells forcing unit to do something: jump to a place, deal combo damage to a unit etc. But I have to know how to make player lose control on hero during time of this spell. I saw it on few maps and it is very useful (it looks like unit is loosing all abilities, other units aren't attacking it and player can't oreder it to do something)

Please help - I can't make real progress without these abilities.
 
Level 1
Joined
Jan 11, 2016
Messages
7

Attachments

  • Asuna.png
    Asuna.png
    2.1 MB · Views: 77
Level 1
Joined
Jan 11, 2016
Messages
7
Asuna Multistrike
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Asuna Blade Onslaught
Actions
Wait 0.01 seconds
Unit - Make (Triggering unit) Invulnerable
Unit - Set (Triggering unit) acquisition range to 0.00
Set multistriketarget1 = (Random unit from (Units within 300.00 of (Position of (Triggering unit)) matching (((Owner of (Matching unit)) Equal to Neutral Hostile) and (((Matching unit) is alive) Equal to True))))
Unit - Move (Triggering unit) instantly to (Position of multistriketarget1)
Unit - Set life of multistriketarget1 to ((Life of multistriketarget1) - (100.00 + ((Real((Agility of (Triggering unit) (Include bonuses)))) x 2.00)))
Special Effect - Create a special effect attached to the chest of multistriketarget1 using Abilities\Spells\Human\Feedback\SpellBreakerAttack.mdl
Wait 0.33 seconds
Set multistriketarget2 = (Random unit from (Units within 300.00 of (Position of multistriketarget1) matching (((Owner of (Matching unit)) Equal to Neutral Hostile) and (((Matching unit) is alive) Equal to True))))
Unit - Move (Triggering unit) instantly to (Position of multistriketarget2), facing (Position of multistriketarget2)
Unit - Set life of multistriketarget2 to ((Life of multistriketarget2) - (100.00 + ((Real((Agility of (Triggering unit) (Include bonuses)))) x 2.00)))
Special Effect - Create a special effect attached to the chest of multistriketarget2 using Abilities\Spells\Human\Feedback\SpellBreakerAttack.mdl
Wait 0.33 seconds
Set multistriketarget3 = (Random unit from (Units within 300.00 of (Position of multistriketarget2) matching (((Owner of (Matching unit)) Equal to Neutral Hostile) and (((Matching unit) is alive) Equal to True))))
Unit - Move (Triggering unit) instantly to (Position of multistriketarget3), facing (Position of multistriketarget3)
Unit - Set life of multistriketarget3 to ((Life of multistriketarget3) - (100.00 + ((Real((Agility of (Triggering unit) (Include bonuses)))) x 2.00)))
Special Effect - Create a special effect attached to the chest of multistriketarget3 using Abilities\Spells\Human\Feedback\SpellBreakerAttack.mdl
Wait 0.33 seconds
Set multistriketarget4 = (Random unit from (Units within 300.00 of (Position of multistriketarget3) matching (((Owner of (Matching unit)) Equal to Neutral Hostile) and (((Matching unit) is alive) Equal to True))))
Unit - Move (Triggering unit) instantly to (Position of multistriketarget4), facing (Position of multistriketarget4)
Unit - Set life of multistriketarget4 to ((Life of multistriketarget4) - (100.00 + ((Real((Agility of (Triggering unit) (Include bonuses)))) x 2.00)))
Special Effect - Create a special effect attached to the chest of multistriketarget4 using Abilities\Spells\Human\Feedback\SpellBreakerAttack.mdl
Unit - Set (Triggering unit) acquisition range to 500.00
Unit - Make (Triggering unit) Vulnerable
 
Level 11
Joined
Oct 9, 2015
Messages
721
what about basing your ability on "Channel" and setting the "Follow Trhought Time" to the time you want to the unit to not recieve orders and not have any abilities (1 sec), also make sure "Disable other abilities" is enabled and that the options is set to "Visible", this will give you the "disabled abilities" effect you want.
 
Level 1
Joined
Jan 11, 2016
Messages
7
Thank you, unfortunately I don't have enough time now to test if it works, but I'll reply soon and tell you about results.
 
Level 22
Joined
Aug 27, 2013
Messages
3,973
(it looks like unit is loosing all abilities, other units aren't attacking it and player can't oreder it to do something)
It's because most of the spells in anime maps pause the caster and make it invulnerable.
This way, the player can't order the caster until the caster finishes the spell and it prevents enemy units to attack the caster.

use
  • Unit - Pause YourUnit
to prevent it from taking any orders and
  • Unit - Unpause YourUnit
to make it return to normal.
 
Level 20
Joined
Aug 13, 2013
Messages
1,696
^ I think it is not recommended in that way.

- Create channel ability, set it's base order ID to defend, follow through time value to 99999s, disable other abilities to 'true'.
Then put these codes to your trigger based on the sequence ( onCast, onEnd ).
  • Untitled Trigger 001
    • Events
    • Conditions
    • Actions
      • -------- -------------------------------------------------------------------------------------- --------
      • -------- onCast --------
      • -------- adding the channel ability to a unit and order it to "defend", also makes the unit invulnerable. --------
      • -------- -------------------------------------------------------------------------------------- --------
      • Custom script: if UnitAddAbility( udg_UNIT, udg_CHANNELABILITY ) and IssueImmediateOrder( udg_UNIT, "defend" ) then
      • Unit - Make (Triggering unit) Invulnerable
      • Custom script: endif
      • -------- -------------------------------------------------------------------------------------- --------
      • -------- onEnd --------
      • -------- removing the channel ability ( artificial pause ) and invulnerability to your unit. --------
      • -------- -------------------------------------------------------------------------------------- --------
      • Unit - Remove Channel from (Triggering unit)
      • Unit - Make (Triggering unit) Vulnerable
 
Level 22
Joined
Aug 27, 2013
Messages
3,973
I think it is not recommended in that way.
It is indeed not recommended. I was just telling him how most people do it in anime maps.
Also, it is not that much of a problem if the spell is for personal use (I think).

Custom scripts can scare people off sometimes, you know. ~

FYI, "Pause Unit" also pauses buff duration and that's why it isn't recommended because it can cause imbalance in a map (if I remember correctly).
 
Level 1
Joined
Jan 11, 2016
Messages
7
Tank you for all the replies, i tested the one from Rheiko and it worked as I wanted. So thank you again.
 
Status
Not open for further replies.
Top