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

Charm and Devour not recognizing unit level?Help!

Status
Not open for further replies.
Level 8
Joined
Nov 22, 2004
Messages
192
1- Actually is there a way to make it that Charm and Devour spell take in consideration a unit level even if it belongs to a player.

2- I am using charm and devour in my map and they don't recognise the creep level. Lets say I put that you cannot charm a level higher then 5 it still charms level 8 etc. What you have to know is that I am changing owner from player to creep. Maybe that is why it does'nt work. It is essential system in my map so I have to keep it.

The BEST thing would be to teach me if it is possible to make it so charm and devour spell recognize unit level no matter if it belongs to a player or creep. Is that makeable?
 
Level 6
Joined
Mar 2, 2006
Messages
306
try these two triggers (simple version):

  • SpellCharmCheckOrder
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Issued order) Equal to (Order(charm))
      • (Level of (Target unit of issued order)) Greater than 5
    • Actions
      • Unit - Order (Triggering unit) to Stop
and

  • SpellCharmCheckSpell
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Charm (fixlevels)
      • (Level of (Target unit of ability being cast)) Greater than 5
    • Actions
      • Unit - Order (Triggering unit) to Stop
together they order your hero to stop (cancel) casting charm if your conditions are not met;

now if you want a message to go with it, use the following trigger instead of first one:

  • SpellCharmCheckOrder
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Issued order) Equal to (Order(charm))
      • (Level of (Target unit of issued order)) Greater than 5
    • Actions
      • Custom script: local player pera = GetOwningPlayer( GetTriggerUnit() )
      • Unit - Order (Triggering unit) to Stop
      • Custom script: if ( GetLocalPlayer() == pera ) then
      • Custom script: call ClearTextMessages()
      • Custom script: call DisplayTimedTextToPlayer( pera, 0.52, -25.00, 3.00, "|cffffcc00That creature is too powerfull.|r" )
      • Custom script: endif
      • Custom script: set pera = null
i hope that helps...
 
Level 6
Joined
Mar 2, 2006
Messages
306
so?
in place of condition:

(Level of (Target unit of ability being cast)) Greater than 5

you'd put (for example):

(Level of (Target unit of ability being cast)) Greater than ( (Level of Charm Ability for Triggering Unit) * 2 + 3 )

of course, come with your own formula. the above one (2*L+3) sets creep level limit to 5,7,9...
 
Status
Not open for further replies.
Top