Warcraft III resources & community, 2003–2006 · archived

Need help at triggering spells!

17 posts
#1

Need help at triggering spells!

Hi all of you who read my topic.I need a simple answer how to make a triggering spell to be cast by many casters??? :( I would accept the answer even if must do it with JASS! :wink:
#2
Umm... you mean be cast by more heroes or whatever at the same time? Pick up every unit in an Unit group and order it to cast the spell if it with no target. If it is with a random target, pick the target.
#3
No!See when i cast it with more the one the the actions begin to work to the second caster.I want them to stay to the first and to begin to the second!That mean to be cast by more then one casters!
#4
oh, being cast by multiple casters from the same player at the same time. I wasn't sure but had a feeling that this would be the problem. IMO there may be a possibility even with triggers by making a huge array (as big as possible) and giving each casting unit a place into that array. I guess you can do this by yourself so it's just an idea. You can then reset the array after the array number is high enough cuz mostly probably the units with lower numbers didn't start casting the spell yet and so only extremely abusive players could cause a problem (and even so... it's mostly improbable). Hope it helps you.
#5
Hmm maybe i got an idea with an array.Look at this!

    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Electric Storm 
    Actions
        Set catsers = (Last created unit group)
        Add (Casting unit) to catsers
        .............................
        The actions for the spell
        .............................
        
And here all aray variables use the Number of units in casters.What do you think?

#6
First, why would you set the Last created unit group value to the catsers? And, how are you actually going to detect them into the unit group? I was trying to suggest a Unit variable with array checked and number of units in the array very very high (8192 is maximum). Still, after a while you'll have to reset them and... getting the number into the array requires another variable and so... pretty not worky if i'm thinking aobut now. But if you think the stuff you made works... Congratulations!
#7
Man have you seen that i add the casting unit into caters whatever he is.The aray will count the collected casting units in casters and at the end i'll add an action to clear the group!
#8
Before I started using JASS, I used a system of arrays and unit groups. Several of my maps use this, but I forget which ones. If you ask, I'll e-mail you one of my best implementations of this system.

However, it is easiest just to use JASS.

~The_Raven
#9

How

can you tell me the code with Jass?PLZ :D
#10
You can also send the System you've last made to [email protected] my e-mail! :D
#11
local (var. type) (var. name)

P.S. I sent the file.

~The_Raven
#12
so this spell can be casted by many casters?I have to look how you've made it!But can you tell me how to do it with JASS anyway?
#13
As I said:
local (var. type) (var. name)

Use this at the top of your function, and you will be able to reference it throughtout the function.

~The_Raven
#14
Thank you Raven,you really are great!And sorry about the topic.I will edit my posts!
#15
Hmm... May I receive that as well?