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

[JASS] How to make any spell autocast'able?

Status
Not open for further replies.

NM_

NM_

Level 1
Joined
Jul 28, 2008
Messages
5
Greetings,

I would like to know how to make _spell_ with autocasting ability?
Actually, I want unit(non-ai) to summon creatures when seeing enemy.

Thank You!
 
Level 10
Joined
Oct 2, 2005
Messages
398
I can do it in GUI:
With dummies.
Do a 'Slow' ability copy.
When this unit sees his enemies, he will cast his slow at them. So, make a trigger like this:
  • Summon Furbolgs
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Slow
    • Actions
      • Unit - Create 1 Furbolg for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing (Position of (Target unit of ability being cast))

Remember that the Furbolgs, in that case, cannot attack air units, so make of the Slow ability only ground-targetered if the summons cannot attack air units.

Ah, and don't forget reducing the Slow spell to a dummy.

-------------------------------------------------------------------------------------

But if you really avoid using an A.I you can do this:

  • Summon Furbolgs
    • Events
      • Unit - A unit is attacked
    • Conditions
      • (Unit-Type of (Triggering Unit)) Equal to Furbolg Summoner
    • Actions
      • Unit - Order (Triggering unit) to Neutral - Summon Furbolgs
This will give a defensive behaviour to your units

---------------------------------------------------------------------------------------

The other option is quite laggy I guess.

  • Untitled Trigger 002
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units of type Furbolg Summoner) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Units within 600.00 of (Position of (Picked unit)) matching (((Owner of (Matching unit)) is an enemy of (Owner of (Picked unit))) Equal to True)) is empty) Equal to False
            • Then - Actions
              • Unit - Order (Picked unit) to Neutral - Summon Furbolgs
            • Else - Actions
Picks every unit of the summoning unit-type in the map, checks if the enemy unit group around him is empty, and if it isn't, does the summoning.

Sorry if you expected some lines of JASS script.
 
Last edited:

NM_

NM_

Level 1
Joined
Jul 28, 2008
Messages
5
Thanks, but I really need another variant :)
And btw, how to turn on autocast spell without manual "clicking"?

About trigger, there is no neutral - summon trigger except "Issue Order With No Target (but it's without target :) )
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
Turning on autocast ?

Unit - Issue order with no target
and order is kinda Human Sorceress - Slow on :/ or something like that
("slowon" as string)
 

NM_

NM_

Level 1
Joined
Jul 28, 2008
Messages
5
Ok, i found a way how to turn on autocast :) (It's in object editor)
But i still need what I asked!
 
Level 3
Joined
Jul 20, 2008
Messages
41
How to do this whole thing and avoid the spam stop button thing? I know its something related to damage detection sys but im not quite sure how to do it :/
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
Unit is attacked is fine for this type of thing I guess

Damage Detection system is the thing what is called Unit takes damage event for every unit in one trigger

My Damage detection also detects damage way in a stupid way (meele-ranged-spell)

So its like
Any Unit Takes Damage
if its Meele
Do actions
 
Level 10
Joined
Oct 2, 2005
Messages
398
Thanks, but I really need another variant :)
And btw, how to turn on autocast spell without manual "clicking"?

About trigger, there is no neutral - summon trigger except "Issue Order With No Target (but it's without target :) )
There is no autocast ability with no target. Sorry to give you such a piece of work of even changing the spell to a dummy... (phew)
 

NM_

NM_

Level 1
Joined
Jul 28, 2008
Messages
5
Lestat(br)

Thanks, i've used your method and it works :)
But, optionaly i want to know more.... So that's why I asked for another variant!

Hm, could you provide example with Unit - neutral summon ....? Reason is that i have non-english WE. Just let me see...
---
I've done with simple create unit and set expiration time. Works greatly ;)


====
OT:
I'm interested where I could find AI jass tutorials?Thanks...
 
Level 10
Joined
Oct 2, 2005
Messages
398
Both of these two would be useless for him, since they have odd triggering.

But I wonder why are you trying to do a JASS AI script if you are already having trouble with the simple GUI triggers I gave you.
JASS isn't something wonderful, flawless and necessary. It is an option.
Use what's easier, faster or more efficient for you.
 

NM_

NM_

Level 1
Joined
Jul 28, 2008
Messages
5
Well, I think jass can do greatly with AI...
Ok, let me repeat - I'm seeking for different way's to get into "finish lane"... I just can't find Unit - Order (Picked unit) to Neutral - Summon Furbolgs... (No summon action)

But the first question I asked nobody knows how to solve :) - make anything autocastable... So I'm still "staying"...
 
Status
Not open for further replies.
Top