HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Archery Tactics trigger help

09-30-2004, 08:13 AM#31
garith
Ok!
I couldent find what is wrong with the critters and shooting so i made a simple trigger to make them die if you cast it ON them.

I made the individual triggers to make evade work better.

I added the archer "death" animation to evade (Because i got bored making the triggers) to make it look like they "dive" out of the way.
(If this looks wierd it can be Easily reversed)

err....
Oh! i added the cast time to shoot so it should work with your right click now.
I also made the evade ability have a cast time of 0.01 seconds so that it Seems to have none now.

Heres the map....
Post if anything is wierd!
-Garith

(P.S. I dont find you inconsiderate for wanting to help all those clans! Im glad to part of it!)
10-06-2004, 12:57 PM#32
MurderMan
Sry to all of those who helped in this post... but it's too late... the clans died... there's no point in rebuilding the map anymore... thank you for your time and patience with this matter... all is appreciated, but unfortunately all is in vein... the clans have died...
10-06-2004, 01:10 PM#33
Dead-Inside
Sorry if I'm enjoying this.

It's not like someone ACTUALLY DIED. Get over it.
10-09-2004, 03:32 AM#34
MurderMan
Quote:
Originally Posted by Dead-Inside
Sorry if I'm enjoying this.

It's not like someone ACTUALLY DIED. Get over it.
Thanks for being so negative, i'm sure you're doing all but helping the situation...
-_-
i'm sure your support is so needed, considering what a helpful post you made, i mean afterall demoting the post is so helpful isn't it? (sarcasm intended) -_-
10-10-2004, 05:41 AM#35
MurderMan
i have an idea that could possibly fix the issue,
the ability Fan of Knives has a pretty accurate attack pattern, in the sense that if u are not hit by the knive it does not hurt u... u can see where i'm going with this...

if we can somehow change the fan of knives ability into a target ability, then redirect it so it's just 1 metaphorical knive(note: in the game it will look like an arrow) then we can recreate the shoot arrow ability to where if u attack u can change your target to whatever u like without having to shoot where u shot.

Example: if your on opposite side of the map, and u shoot arrow at something on the opposite side of the map, u can't change target, ur archer is forced to walk all the way there and attack before it can do anything else...

we're looking to fix that... or at least i am anyways, any help would be appreciated
10-10-2004, 05:56 AM#36
Pheonix-IV
cant be done. You cant edit the hardcoded basis of the spells (to my knowledge)

like i said, to fix that, tell your archer to "stop" (hotkey S) this should work.
Also if the archer is the only unit, then right clicking should work too.
10-10-2004, 06:07 AM#37
MurderMan
lol there's a problem w/that too... ummm ya s is the hotkey for shoot arrow... 2 hotkeys... um shoot arrow overrides stop
i know u can change the hotkey, yes yes. but i'm looking for a more perminant solution, you see if there comes another patch i don't want this problem to happen again

i attempted to fix it by changing the base ability to a similar ability and placing the same values in the areas neccessary... with the same result i'm afraid... :(

is there some way u can create a trigger based ability that can create an attack that is a straight line, only u see the arrow and that's all?
10-13-2004, 01:46 AM#38
MurderMan
any ideas anyone????
10-13-2004, 02:29 AM#39
a thing
This might be a bit laggy but I've got an idea.

1. Make an ability based off of Channel with a unit or point target.
2. Make a unit with the arrow model that is collisionless and unselectable (give it the Locust ability). Have this move at 15 per second.
3. Make this trigger:
Code:
function dmg takes nothing returns nothing
    call KillUnit(GetEnumUnit())
endfunction

function Trig_Shoot_arrow_Actions takes nothing returns nothing
    local unit arrow
    local integer i = 1
    local group TempGroup
    call CreateNUnitsAtLoc( 1, RAW DATA CODE FOR ARROW, Player(bj_PLAYER_NEUTRAL_EXTRA), PolarProjectionBJ(GetUnitLoc(GetSpellAbilityUnit()), 0.00, GetUnitFacing(GetSpellAbilityUnit())), GetUnitFacing(GetSpellAbilityUnit()) )
    set arrow = GetLastCreatedUnit()
    call IssuePointOrderLocBJ( arrow, "move", GetSpellTargetLoc() )
    loop
        exitwhen i > R2I(DistanceBetweenPoints(GetUnitLoc(GetSpellAbilityUnit()), GetSpellTargetLoc())) / 15
        set TempGroup = GetUnitsInRangeOfLocAll(35.00, GetUnitLoc(arrow))
        call ForGroupBJ( TempGroup, function dmg )
        call DestroyGroup( TempGroup )
        call PolledWait(1.00)
        set i = i + 1
    endloop
    call RemoveUnit(arrow)
endfunction

//===========================================================================
function InitTrig_Shoot_arrow takes nothing returns nothing
    set gg_trg_Shoot_arrow = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Shoot_arrow, EVENT_PLAYER_UNIT_SPELL_CAST )
    call TriggerAddAction( gg_trg_Shoot_arrow, function Trig_Shoot_arrow_Actions )
endfunction
10-13-2004, 12:06 PM#40
MurderMan
Quote:
Originally Posted by a thing

function Trig_Shoot_arrow_Actions takes nothing returns nothing
local unit arrow
local integer i = 1
local group TempGroup
call CreateNUnitsAtLoc( 1, RAW DATA CODE FOR ARROW, Player(bj_PLAYER_NEUTRAL_EXTRA), PolarProjectionBJ(GetUnitLoc(GetSpellAbilityUnit()), 0.00, GetUnitFacing(GetSpellAbilityUnit())), GetUnitFacing(GetSpellAbilityUnit()) )
set arrow = GetLastCreatedUnit()
call IssuePointOrderLocBJ( arrow, "move", GetSpellTargetLoc() )
loop
exitwhen i > R2I(DistanceBetweenPoints(GetUnitLoc(GetSpellAbilityUnit()), GetSpellTargetLoc())) / 15
set TempGroup = GetUnitsInRangeOfLocAll(35.00, GetUnitLoc(arrow))
call ForGroupBJ( TempGroup, function dmg )
call DestroyGroup( TempGroup )
call PolledWait(1.00)
set i = i + 1
endloop
call RemoveUnit(arrow)
endfunction

//===========================================================================
function InitTrig_Shoot_arrow takes nothing returns nothing
set gg_trg_Shoot_arrow = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Shoot_arrow, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddAction( gg_trg_Shoot_arrow, function Trig_Shoot_arrow_Actions )
endfunction[/code]



wow forgive me if i sound like a noob but... do i have to type all of that^?!?!?!
10-13-2004, 12:08 PM#41
MurderMan
FYI i'm probably not the best person suited for doing what u asked me....

first off i don't know how to make custom models...

2nd off...

i'm not too good w/triggers either...

i'm more of a wc3 PLAYER not a map maker...
10-13-2004, 12:09 PM#42
MurderMan
I'm willing to learn anything u're willing to teach however... teach me?
10-13-2004, 03:07 PM#43
a thing
Quote:
Originally Posted by a thing
This might be a bit laggy but I've got an idea.

1. Make an ability based off of Channel with a unit or point target.
2. Make a unit with the arrow model that is collisionless and unselectable (give it the Locust ability). Have this move at 15 per second.
3. Make this trigger:
Code:
function dmg takes nothing returns nothing
    call KillUnit(GetEnumUnit())
endfunction

function Trig_Shoot_arrow_Actions takes nothing returns nothing
    local unit arrow
    local integer i = 1
    local group TempGroup
    call CreateNUnitsAtLoc( 1, RAW DATA CODE FOR ARROW, Player(bj_PLAYER_NEUTRAL_EXTRA), PolarProjectionBJ(GetUnitLoc(GetSpellAbilityUnit()), 0.00, GetUnitFacing(GetSpellAbilityUnit())), GetUnitFacing(GetSpellAbilityUnit()) )
    set arrow = GetLastCreatedUnit()
    call IssuePointOrderLocBJ( arrow, "move", GetSpellTargetLoc() )
    loop
        exitwhen i > R2I(DistanceBetweenPoints(GetUnitLoc(GetSpellAbilityUnit()), GetSpellTargetLoc())) / 15
        set TempGroup = GetUnitsInRangeOfLocAll(35.00, GetUnitLoc(arrow))
        call ForGroupBJ( TempGroup, function dmg )
        call DestroyGroup( TempGroup )
        call PolledWait(1.00)
        set i = i + 1
    endloop
    call RemoveUnit(arrow)
endfunction

//===========================================================================
function InitTrig_Shoot_arrow takes nothing returns nothing
    set gg_trg_Shoot_arrow = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Shoot_arrow, EVENT_PLAYER_UNIT_SPELL_CAST )
    call TriggerAddAction( gg_trg_Shoot_arrow, function Trig_Shoot_arrow_Actions )
endfunction


Err... mabye 75 per second. LOL.

Code:
function ShootArrowConditions takes nothing returns boolean
    if ( not ( GetSpellAbilityId() == 'RAW DATA CODE FOR SHOOT ARROW' ) ) then
        return false
    endif
    return true
endfunction

function dmg takes nothing returns nothing
    call KillUnit(GetEnumUnit())
endfunction

function ShootArrowActions takes nothing returns nothing
    local unit arrow
    local integer i = 1
    local group TempGroup
    call CreateNUnitsAtLoc( 1, 'RAW DATA CODE FOR ARROW', Player(bj_PLAYER_NEUTRAL_EXTRA), PolarProjectionBJ(GetUnitLoc(GetSpellAbilityUnit()), 0.00, GetUnitFacing(GetSpellAbilityUnit())), GetUnitFacing(GetSpellAbilityUnit()) )
    set arrow = GetLastCreatedUnit()
    call IssuePointOrderLocBJ( arrow, "move", GetSpellTargetLoc() )
    loop
        exitwhen i > R2I(DistanceBetweenPoints(GetUnitLoc(GetSpellAbilityUnit()), GetSpellTargetLoc())) / 37.5
        set TempGroup = GetUnitsInRangeOfLocAll(35.00, GetUnitLoc(arrow))
        call ForGroupBJ( TempGroup, function dmg )
        call DestroyGroup( TempGroup )
        call PolledWait(.50)
        set i = i + 1
    endloop
    call RemoveUnit(arrow)
endfunction

//===========================================================================
function InitTrig_Shoot_arrow takes nothing returns nothing
    set gg_trg_Shoot_arrow = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Shoot_arrow, EVENT_PLAYER_UNIT_SPELL_CAST )
    call TriggerAddCondition( gg_trg_Melee_Initialization, Condition( function ShootArrowConditions ) )
    call TriggerAddAction( gg_trg_Shoot_arrow, function ShootArrowActions )
endfunction

Just make a unit with the arrow missle model (Abilities\Weapons\Arrow\ArrowMissile.mdl) and C + P that trigger but make sure you fill in the part "'RAW DATA CODE FOR ARROW'" and "'RAW DATA CODE FOR SHOOT ARROW'". To get the raw data code, open the Object Editor and click on the Units/Abilities tab. Then press Ctrl + D. Look at the arrow unit and whatever it says on the list on the left right beside "arrow"/"Shoot arrow" is the raw data code for an arrow.
10-13-2004, 10:11 PM#44
MurderMan
i got an error message, it said this


Line 226: Expected expression

and it highlights this

if ( not ( GetSpellAbilityId() == 'u000:uloc' ) ) then
10-13-2004, 10:19 PM#45
MurderMan
wait i just fixed that

now it says
the following errors followed by what it highlights

Line 240: expected expression
call CreateNUnitsAtLoc( 1, 'u000:uloc', Player(bj_PLAYER_NEUTRAL_EXTRA), PolarProjectionBJ(GetUnitLoc(GetSpellAbilityUnit() ), 0.00, GetUnitFacing(GetSpellAbilityUnit())), GetUnitFacing(GetSpellAbilityUnit()) )

Line 244: expected a name
exitwhen i > R2I(DistanceBetweenPoints(GetUnitLoc(GetSpellAbili tyUnit()), GetSpellTargetLoc())) / 37.5

Line 256: expected a variable name
set gg_trg_Shoot_arrow = CreateTrigger( )

Line 257: expected a name
call TriggerRegisterAnyUnitEventBJ( gg_trg_Shoot_arrow, EVENT_PLAYER_UNIT_SPELL_CAST )

Line 259: expected a name
call TriggerAddAction( gg_trg_Shoot_arrow, function ShootArrowActions )

hope that helps narrow down the problem...