My units wont cast spells..

pyrrrho

New Member
Reaction score
0
I could use some advice on spellcasting.

I made a none Meele map.
I have (hostile units),
and ( player 9 units) in certain area of the map.

Player 9 has his own force.., I made this to see if (player 9) units would casts spells.. compaired to the hostile units. ( A few spell's work like Fireball...Forst armor) But these spells are basics hostile unit spell... and most of them seem to work.

Now I have placed "normal orc" units over the map. In Costume upgrades I marked the spell's for "player 9" as " Researched".

The only spells that are beeing cast are Bloodlust, and off course the Auras.. but most spells do not work ( I want them to cast healing wards, spirit link etc..)

...


side note: I did edit the nomal orc units Life/Level/dmg base and Def base.

I edited in Gameplay constanst " Hero exp Gained - normal factors 1.00" ( instead of 5) That way a level 20 unit (from player 9 ) gives less experiance. For a hostile unit, I edited in "Gameplay constanst " - "Hero exp Gained - Creep Reduction Table : 100, 90,80,70,60,50. So the experiance I get is Perfect for my map. There is just the spell problem... =D

The big question is : do I need to make a trigger for each spell??
 

pyrrrho

New Member
Reaction score
0
it is a really simply question.. maybe I rewritte it :)

"Why are some default Abilites beeing cast by the AI and some not?"
 

pyrrrho

New Member
Reaction score
0
lol Ok I set my units mana to 0 :))) lol lol lol =D
Imfo this is funny xD


So the heros do cast spells now/ but orc units seem to be casting just a few spells.
I might make a few costume Heros and change there spells. Than switch there Icons to Shaman/ spirit walker etc :)
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
Congrats, your first triple post. Please say its your last - nobody likes to see three posts that could have been combined into one, especially so when the posts are full of nonsensical language.

Back to the topic, have you resolved your problem, and if not what do you need help about?
 

pyrrrho

New Member
Reaction score
0
I am sorry about that .. I wont do it again!!!!
And yes I still need help. I don't understand why some spells wont be cast by the AI..

Would it be a good idea to make Triggers for each boss / typ of units to cast certain spells.

For example Healing abilities / summoning abilities.
And if so what is the most usefull way to trigger these spells without creating to many leaks..
(I am still taking about none customized spells)

For example do I use : Unit is attacked / or a timing trigger with a condition, for best performance.

Edit: I corrected some grammar in my posts.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
You would probably use A unit is Attacked to detect whenever a boss is being engaged in combat. And AIs are still a mystery, filled with lots of bugs and weird quirks. It's safer to trigger any AI controlling, since the melee AI doesn't utilise most custom content. The way you trigger it depends on what you want - memory leaks are all explained here.
 

pyrrrho

New Member
Reaction score
0
Code:
Units Healing spells
    Events
        Unit - A unit owned by Neutral Hostile Is attacked
    Conditions
        (Percentage life of (Triggering unit)) Less than or equal to 70.00
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Attacked unit) is visible to Neutral Hostile) Equal to True
            Then - Actions
                Unit - Order (Attacked unit) to Orc Shaman - Lightning Shield (Attacked unit)
                Unit - Order (Attacked unit) to Orc Spirit Walker - Spirit Link (Attacked unit)
                Unit - Order (Attacked unit) to Orc Shadow Hunter - Healing Wave (Attacked unit)
                Unit - Order (Attacked unit) to Undead Banshee - Anti-magic Shell (Attacked unit)
                Unit - Order (Attacked unit) to Undead Dreadlord - Sleep (Attacked unit)
                Unit - Order (Attacked unit) to Neutral - Heal (Attacked unit)
                Unit - Order (Attacked unit) to Neutral Dark Ranger - Life Drain (Attacking unit)
            Else - Actions
                Wait 20.00 seconds
                Unit - Set life of (Attacked unit) to 100.00%

Maybe somthing like this??

This should trigger @ 70 % right?


Im woking on it cause i want any unit in range of Player 1 ( red)to cast the ability

So basically any unit who is attacked by player 1 ( in range of player one) will cast these abilities, if they have them, Othewise if they are beeing "stoped attacked" by "Player one" and not "visible by player one" return to Maximum life..:))


<< or thats what I want :))

Im going to sleep now still need to fix "visible to player one" ( and thank you for the memory leaks link)


P.s I dont mind Jass codes :) just drop them !! My bro can help me with them, but I honestly dont think I need jass in what im trying to do :)
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
It works, but I'm not sure if the orders might clash, even if the attacked unit only has one of the many skills that can be casted. Also, Attacked Unit and Triggering Unit should refer to the same unit in this trigger.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top