• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

spell help

Status
Not open for further replies.
Level 3
Joined
Mar 27, 2006
Messages
29
hey i was wonderin if it is possible to make these spells..

If this skill is learn.. only at night the hero can see evey enemy hero within AOE 1200. hw do i make this spell....???

n the other one is auto trnsformation... at night the hero the trnsform n get xtra move speed n attack speed...


please do let me knw... thanx
 
Level 2
Joined
Jul 30, 2005
Messages
13
For the Nightsight spell, look at the Night Elves - they have a Infra-invision upgrade (something like that) which extends their LOS only at night. Alternatively, look at the Goblin Nightscope item - it does pretty much the same thing.

For the transform spell - put a trigger in your map that simply reads the time of day, and then activates this transformation ability only when it is night ie from 20:00 to 08:00. Try using something like the Demon Hunter's Demon Form spell.
 
Level 22
Joined
Jan 10, 2005
Messages
3,426
events: time of day becomes 18.00
conditions: -----
actions: turn on trigger 1 and turn on trigger 2


trigger 1

events: -------
conditions: -------
actions: set *....* sight right range to 1200 (dunno if this function excitst, if it doesnt, just give it an item ability that increases sight range

trigger 2

events: -----------
conditions: --------
actions: unit - add ability (add two item abilities that add movement speed and attacks peed)

(item abilities dont have icons in game)
 
Level 3
Joined
Mar 27, 2006
Messages
29
heyy

theres another problem.... i wanna make a passive skill... heres wat it does...

at night the hero transforms auto!!!! get extra move n attack speed... n at level 4 he gets vision of every hero in 800 aoe...

i dun mean extra vision... its like the if an enemy hero come within 800 aoe he will be able to see that hero....

is this possible.....?????
 
Level 22
Joined
Jan 10, 2005
Messages
3,426
yea ofcourse,

events: time becomes XXX
conditions: --------
actions: if: that hero has the passive spell (or use if 'boolean variable= true (set it to true in another trigger when he learns the spell))
then: replace unit (the one with more attack speed etc)
else: donothing

second trigger for vision from enemy heroes

events: unit comes eithing range of 'the hero'
conditions: entering unit belongs to an enemy of 'owner of ur hero'
actiosn: unit - grant vision of entering unit to owner of ur hero
 
Level 3
Joined
Mar 27, 2006
Messages
29
theres a problem....... i changed my mind about the 3rd spell... nw i wan the hero to trnsform wen its night.... i tried doing wat u wrote... he does trnsform bt all the skills hav to be learn again..... hw can i make stop tht from happenin.... n the other problem is with the grant vision cant i jus pickup every enemy hero within 1200 aoe of n giv them night elfs amp buff or something.. if so....let me knw hw....
 
Level 11
Joined
Jul 12, 2005
Messages
764
To relearn the skills, you have to store the levels of the known skills into an integer variable (array) BEFORE you replace the unit. Then after you've replaced it, just set the levels of the abilities to the values that you've stored. And you may also store the unspent skillpoints to avoid problems.
 
Level 3
Joined
Mar 27, 2006
Messages
29
hw do i do tht... m lost here.... a lil help??


To relearn the skills, you have to store the levels of the known skills into an integer variable (array) BEFORE you replace the unit. Then after you've replaced it, just set the levels of the abilities to the values that you've stored. And you may also store the unspent skillpoints to avoid problems.
 
Level 11
Joined
Jul 12, 2005
Messages
764
ok. create an integer variarble array. let's call it Skills. so u have the trigger. let's call the replacable unit RU. at the beginning of the trigger, set Skills[1] to the "Level of UnitSpellnr.1 :? for RU". Set Skills[2] to the "Level of UnitSpellnr.2 :? for RU"... blabla, then set Skills[5] to the number of RU's unspent skillpoins.

now you have all levels stored in the Skills variable array, replace the unit with the new one. let's call the new hero NU. then use the actions:
Set the UnitSpellnr.1 for NU to Skills[1]
Set the UnitSpellnr.2 for NU to Skills[2]
.
.
Set unspent skillpoints for NU to Skills[5].

That's all.
 
Level 3
Joined
Mar 27, 2006
Messages
29
i tried tht.... its jus not working... heres the trigger

event
a unit learns a skill
condition
learned hero skill = the change
action
set the changehero = learning hero
set the change[1] = level of leap for the changehero
set the change[2] = level of BleedingClaw for the changehero
set the change[3] = level of Strength of the Night for the changehero
set the change[4] = level of the change for the changehero
set the change[5] = unspent skill points of for the changehero
if - then - else
if - level of the change for the_changehero = 1
in-game time of day less than 6.00
in-game time of day greater than 18.00
then - replace the_changehero with a werewolf model using the old unit's relative life and mana
set level of leap for last replaced unit to the change[1]
set level of BleedingClaws for last replaced unit to the change[2]
set level of Strength of the Night for last replaced unit to the change[3]
set level of The Change for last replaced unit to the change[4]
.... n so on n so on.... but its jus not working..... ne idea y??? :S
 
Level 11
Joined
Jul 12, 2005
Messages
764
maybe the problem is that you need 'OR' between these:
in-game time of day less than 6.00
in-game time of day greater than 18.00
cause if you put AND between them, than it can never happen! :D
and you should also put these two in the trigger condition, not in the if-then-else, cause if its day, than you stored the levels unnecessarily.

if this isn't the prob, than you should try storing the new unit too, and you dont have to use lastcreatedunit.
 
Level 3
Joined
Mar 27, 2006
Messages
29
hey
i did everything... it is working but i jus cant restore the skills to the replaced unit..... i did everything u wrote.... ne idea wat would be wrong?
 
Level 11
Joined
Jul 12, 2005
Messages
764
i dont really know what you mean by you cant RESTORE the skills...
i have a similar "replacing system" in my map, and it's working properly. the trigger you wrote is correct.
i also use an if-then-else like this:
if (change[1] not equal to 0) then
set level of ... to change[1]
if -"-[2] -"- bla bla
but i don't think this is the problem...
 
Level 3
Joined
Mar 27, 2006
Messages
29
hey

its working nw.. i jus added Add ability action.... n then the set level action... but nw m facing another problem... the unit is being replaced but on time the skills r being reclamed.... but its like this....

i didnt learn the 1st skill but wen the unit trnsforms it has the 1st skill learn already... hw can i stop tht..... it happens with all the skill...

n the other problem is... like if the units in lvl 7 n the unit trnsforms.... the unit get another 7 skill points..... neidea wat would be wrong...
 
Level 11
Joined
Jul 12, 2005
Messages
764
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... :) )
 
Level 11
Joined
Jul 12, 2005
Messages
764
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:
JASS:
...
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
...
 
Level 3
Joined
Mar 27, 2006
Messages
29
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????
 
Level 11
Joined
Jul 12, 2005
Messages
764
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... :) )
 
Status
Not open for further replies.
Top