HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

This Spell Needs Help

09-12-2006, 05:51 AM#1
SinisterX
Trigger:
Spell Banish
Collapse Events
Unit - A unit Begins casting an ability
Collapse Conditions
(Ability being cast) Equal to Banish
Collapse Actions
Wait - 0.50 seconds
Unit - Move (Targeted Unit) instantly to (Random Point in (Playable map area))

What i want the spell to do is, move or "teleport" the target unit somewhere in the map.

Now these triggers work if i change to (Triggering Unit) and it moves the casting unit.

So how do i get it to work. (move the targeted unit)

BTW, im a noob to Spell Making.
09-12-2006, 06:27 AM#2
Fireeye
Uhm, i don't really understand what you want?
Unit - Move (Targeted Unit) instantly to (Random Point in (Playable map area)) can not work, because it's (i hope so for you) an untargeted spell (e.g. thunderclap ), so you have to use Triggering Unit, if it's a targeted spell (e.g. chain lightning ) you have to use something like (not sure if you can use "Target Unit of Ability being casted" with a wait, that's why JASS)

Collapse JASS:
function MoveHero takes unit a returns nothing
call TriggerSleepAction( 0.50 )
call SetUnitPositionLoc( a, GetRandomLocInRect(GetPlayableMapRect()) )
endfunction

When you have TFT you can call it like this:

Trigger:
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Banish
Collapse Actions
Custom script: call MoveHero( GetSpellTargetUnit())
Just copy the JASS Part in the "Custom Script Code" Area.
When you don't have TFT, copy the part in the Spell Trigger and change it to:
Collapse JASS:
function Trig_Move_Conditions takes nothing returns boolean
    If (GetSpellAbilityId() == '<Your Spell>' ) then
        return true
    else
        return false
     endif
endfunction

function Trig_Move_Actions takes nothing returns nothing
local unit a
set a=GetSpellTargetUnit()
call TriggerSleepAction( 0.50 )
call SetUnitPositionLoc( a, GetRandomLocInRect(GetPlayableMapRect()) )
endfunction

//===========================================================================
function InitTrig_Move takes nothing returns nothing
    set gg_trg_Move = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Move, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( gg_trg_Move, Condition( function Trig_Move_Conditions ) )
    call TriggerAddAction( gg_trg_Move, function Trig_Move_Actions )
endfunction
09-12-2006, 06:48 AM#3
The)TideHunter(
Quote:
Originally Posted by SinisterX
Trigger:
Spell Banish
Collapse Events
Unit - A unit Begins casting an ability
Collapse Conditions
(Ability being cast) Equal to Banish
Collapse Actions
Wait - 0.50 seconds
Unit - Move (Targeted Unit) instantly to (Random Point in (Playable map area))

You cant use (Targeted Unit), thats for a event a unit is targeted or something.
You want, in this situation to use Target unit of ability being cast
This is good:

Trigger:
Spell Banish
Collapse Events
Unit - A unit Begins casting an ability
Collapse Conditions
(Ability being cast) Equal to Banish
Collapse Actions
Wait - 0.50 seconds
Unit - Move (Target unit of Ability being cast) instantly to (Random Point in (Playable map area))
09-12-2006, 08:35 AM#4
aquilla
better to use starts the effect of an ability as the event
09-12-2006, 04:41 PM#5
SinisterX
Ok, the "Banish Spell" is based off the Paladin "holy Light" Ability. So it is a targeted spell.

Fireeye - I tried what you said (i have TFT) and i got an error while compiling the map.

Trigger:
Spell Banish
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Banish
Collapse Actions
Wait - 0.50 seconds
Unit - Move (Target Unit of issued order) instantly to (Random Point in (Playable map area))

I couldnt find "Target unit of Ability being cast" only "Target Unit of issued order" but thats not working either.
09-12-2006, 04:46 PM#6
The)TideHunter(
Quote:
Originally Posted by SinisterX
Ok, the "Banish Spell" is based off the Paladin "holy Light" Ability. So it is a targeted spell.

Fireeye - I tried what you said (i have TFT) and i got an error while compiling the map.

Trigger:
Spell Banish
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Banish
Collapse Actions
Wait - 0.50 seconds
Unit - Move (Target Unit of issued order) instantly to (Random Point in (Playable map area))

I couldnt find "Target unit of Ability being cast" only "Target Unit of issued order" but thats not working either.

If you have wc3 TFT you will have Target unit of Ability being cast.
It might be a target spell, but that dosent mean you use targeted unit.
If you look, its actually called "Event Response - Targeted Unit.", meaning only if you use the event a unit is targeted.
The correct one is definatly Target unit of Ability being cast.
09-12-2006, 04:59 PM#7
SinisterX
I do have Wc3 TFT but that option is no where to be found.

Is it possible that its do to an older version of TFT?

(im not crazy, the option isnt there).
09-12-2006, 05:07 PM#8
Fireeye
Shall i attach my way here?
(btw. i didn't use GUI because it won't be MUI)
Attached Files
File type: w3xBanish.w3x (12.9 KB)
09-12-2006, 05:10 PM#9
SinisterX
Please, do.
09-12-2006, 05:24 PM#10
Rising_Dusk
Zoom (requires log in)
Attached Images
File type: jpgTUoABC.JPG (68.7 KB)
09-12-2006, 05:43 PM#11
SinisterX
Rising - That option is completly non existant in my version. As well as the last option on that list.

I think this has to do with my version of the World Editor, because i got an error with a test map that Fireeye sent me.

I have TFT Spanish Edition, it says version 6031

So i guess im stumped as to what is wrong.
09-12-2006, 07:40 PM#12
The)TideHunter(
Go on Wc3, click Battle.net, it should download the latest version, if it takes you straight to the login page, reinstall wc3 or W/E.
09-12-2006, 11:08 PM#13
Ignitedstar
Logging on B.net automattically gives Wc3 the lastest update if you don't have it. Try it that way.
09-13-2006, 02:21 AM#14
SinisterX
Thanks my version was really old, first release of the Frozen Throne.

Anyways i changed my spell..

Now it transports (moves instantly) a random Number of Enemy Units around the Hero (Caster) to random spots on the map, while causing stun and doing damage.

The spell is working fine now, i just have to test it while playing. Im problably thinking it will be an ultimate.
09-13-2006, 12:29 PM#15
zeroXD
uhm, u cant use target unit of ability being cast, because its lost after a wait (at least it is for me). A unit variable should work fine.