Warcraft III resources & community, 2003–2006 · archived

spell help

20 posts
#16
everything u have to do is written above..
use an if-then-else statement to prevent the unit to learn the level 1 skills by itself:

if (change[1] not equal to 0) then
set level of Ability1 for ReplacedUnit to change[1]

also u should do this with the unspent skillpoints too.

you should try not using Add Ability action, but set the abilities in the object editor at the unit's preferences (hero abilities).

(next time i'll prepare and post you my replacing code. the only problem is that it's written in jass... :) )
#17
HEY, i finally found out what the proble is:

if change[1] > 0 then
Hero - Learn Ability1 for your unit
setabilitylevel...

this must work indeed!

here's my code:

...
set a[1] = GetUnitAbilityLevel(u, A1)
...
set NU = ReplaceUnitBJ(u, newunittype, bj_UNIT_STATE_METHOD_MAXIMUM)
...
if a[1] > 0 then
   call SelectHeroSkill(NU, A1)
   call SetUnitAbilityLevel(NU, A1, a[1])
endif
...
#18
heyyy thanxxx dude.... it worked......
#19

HELP!!!!!!

ok i am having serious problem with this spell.,..... paskovich thanxxx it did help but nw theres a new problem..... i did store the skills on variables heres the trigger.... can neone help


the 2nd trigger
night:
event
every 1 sec of game time
conditions
or(any conditions are true)
conditions:in game time lesser than 6.00
in game time greather than 18.00
actions:
replace thehero with themorphedhero.....
if-then-else
if level of leap for thehero greater then 0
then hero-learn skill for the last replaced unit leap
set level of leap for last replaced unit to change[1]
so on so on....

heres the thing.... its a passvie skill.... n its level six wenever the hero learns it n if its night he will transform... but the problem is the wen its night... the trigger replaces the unit but every 1 sec the unit is being replaced... i knw its bcoz of the event... is there anyway to stop tht from happening????
#20
use 2 triggers:

1.
use the event 'game time becomes':
- greater than or equal to 0
conditions:
- game time is < 6

2.
event:
- game time becomes greater than or equal to 18
cond:
- game time is < 24

and they have the same action...

(sorry i've been on holiday for a week... :) )