I just started up with map making

roXplosive

New Member
Reaction score
15
I just started up this week and decided to make 1 custom hero but when I try this first spell with Jass I got stuck .
I use NewGen for editing and JassCratf to look up constants/functions/events and such .
Still I don't know what is wrong with this statement :

UnitDamageTargetBJ(u,u,5.00,ATTACK_TYPE_MAGIC,DAMAGE_TYPE_UNIVERSAL)

Any help is appreciated

A question ( i like maths ) I s there a way to make an unit move on a geometrical locus ?
I mean simple ones like arcs of elipse/circle/hiperbola because I've seen a way to make them move in a line but I don't like lines only .
 

Weegee

Go Weegee!
Reaction score
102
what is u and from common sense you dont need to put the unit variable twice :p

Unless, Im wrong :p
 

roXplosive

New Member
Reaction score
15
I made a spell and I want the caster to take damage when the spells summons dummy units 5 damage unreduced
by anything and in the damage part of the spell whenever a dummy is in range of
an enemy and my spell deals damage my hero will be healed by 1 hp .

Here is the line above the one posted before ; maybe the error is here :(

set spirits[i+j*udg_Spirits]=CreateUnit(GetOwningPlayer(u),'e000',X+udg_InnerCircleCentersX[j+1]+udg_ArcRadius*Cos(i*udg_ArcVariationOnTimer+udg_Arcs1Start[j+1]),Y+udg_InnerCircleCentersY[j+1]+udg_ArcRadius*Sin(i*udg_ArcVariationOnTimer+udg_Arcs1Start[j+1]),0)
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
Newgen can also look up the constants and events and stuff
 

roXplosive

New Member
Reaction score
15
User hits himself for 5d6 facepalm damage . I have forgotten to use the keyworj "call" to call the function . Now that's dumb (i was used for functions to be called only by names ) .

Antoher question (not as dumb as the former) : what is this statement used for ? "GetWidgetLife(cast) > 0.405" does it stand for unit "cast" is alive ?
 

Viikuna

No Marlo no game.
Reaction score
265
Usually yea.

Note that it can fail if you change dead units hp to higher than .405 with some other code. This is why you should have some custom heal unit -function which checks units health before changing it.



You can also use IsUnitType(unit,UNIT_TYPE_DEAD), but note that it will return false if your unit has been removed from the game.

edited.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top