wc3edit.net

United Warcraft 3 map hacking!
It is currently April 27th, 2024, 4:30 am

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: June 26th, 2011, 10:28 pm 
Offline
Junior Member
User avatar

Joined: June 26th, 2011, 1:51 pm
Posts: 26
Location: South-Afrika
Title: -Outofmana-
See. in this trigger below i have made a unit fly up, and when he is busy flying up it is busy creating BreathOfFireDamage.mdl Model
on the unit.
the thing is what i want help with is how do i make 10 BreathOfFireDamage.mdl models Deleted all 10 at the same time after the unit
comes back to the ground. Can anyone help?? :neutral:

function Trig_Rise_Conditions takes nothing returns boolean
if ( not ( 'A000' == GetSpellAbilityId() ) ) then
return false
endif
return true
endfunction

function Trig_Rise_Actions takes nothing returns nothing
call SetUnitScalePercent( GetTriggerUnit(), 50.00, 50.00, 50.00 )
call SetUnitFlyHeightBJ( GetTriggerUnit(), 350.00, 100.00 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 10
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call AddSpecialEffectTargetUnitBJ( "origin", GetTriggerUnit(), "Abilities\\Spells\\Other\\BreathOfFire\\BreathOfFireDamage.mdl" )
call TriggerSleepAction( 0.05 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call SetUnitFlyHeightBJ( GetTriggerUnit(), 0.00, 100.00 )
endfunction

//===========================================================================
function InitTrig_Rise takes nothing returns nothing
set gg_trg_Rise = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Rise, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Rise, Condition( function Trig_Rise_Conditions ) )
call TriggerAddAction( gg_trg_Rise, function Trig_Rise_Actions )
endfunction

_________________
-OUTOFMANA-


Top
 Profile  
 
PostPosted: June 27th, 2011, 12:43 am 
Offline
Forum Spammer

Joined: March 30th, 2009, 9:02 pm
Posts: 682
lol o.o u dont have any pauses except that sleep action for .05 sec
that means that entire function finishes in less than a sec
no wonder u dont see anything...

u might wanna make an array and set the effects to the array to delete them all later
(set ARRAY[bj_forLoopAIndex]=call AddSpecial.........)
then at the end, after the set fly hight to 0,
make another loop to destroy all the effects stored in the array

and if u wanna see the guy float in the air for a bit, just extend the time in TriggerSleepAction or add another one before the setflyhight to 0


Top
 Profile  
 
PostPosted: June 27th, 2011, 10:21 am 
Offline
Junior Member
User avatar

Joined: June 26th, 2011, 1:51 pm
Posts: 26
Location: South-Afrika
Title: -Outofmana-
DUDE!
You are like my hero :ayeaye:
Thank Alot

_________________
-OUTOFMANA-


Top
 Profile  
 
PostPosted: June 27th, 2011, 11:19 am 
Offline
Junior Member
User avatar

Joined: June 26th, 2011, 1:51 pm
Posts: 26
Location: South-Afrika
Title: -Outofmana-
Dude can you pls link a array tutorial.
i don't get it. :idea:

_________________
-OUTOFMANA-


Top
 Profile  
 
PostPosted: June 27th, 2011, 1:16 pm 
Offline
Super Moderator

Joined: February 3rd, 2009, 11:28 pm
Posts: 2394
http://world-editor-tutorials.thehelper ... view=20023


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 25 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

phpBB SEO


Privacy Policy Statement
Impressum (German)