• 🏆 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!

[vJASS] Don't understand the changes (constant and private)

Status
Not open for further replies.
Level 2
Joined
Dec 14, 2012
Messages
20
So this may sound stupid but here I go.


I have learn my self jass via opening warmap.j files with the normal jasscraft v1.1.3


and this is how my map coding looks for the moment ( did not paste all if its to much)

Globals

JASS:
t omniu    
unit GHOSTU   
timer SET
unit SNIPT
integer omnilvl
trigger Death 
string s2ss 
real minx=0
real miny=0
real maxx=0
real maxy=0
rect Reg
real r2r
hashtable VV=InitHashtable()
hashtable OV=InitHashtable()
hashtable HV=InitHashtable()
hashtable LO=InitHashtable()
hashtable GB=InitHashtable()
hashtable ED=InitHashtable()
hashtable OF=InitHashtable()
group HF=CreateGroup()
lightning PF=null
player ZF=null
integer FL=0
unit WL=null
integer array OS
timer MT=null
boolean array VU
item array OU
boolean magnusfix=false  
unit SEU
integer MU=1 
integer HY=0
integer HZ=0
integer array H2
integer array H3
real Y4=1
boolean L5=false
boolean H6=false
integer VVV=0
real array VEV
sound VXV=null
integer array VOV
integer array VRV
integer array VIV
integer array VAV
integer array VNV
integer array VBV
integer array VCV
integer array VDV
boolean array VFV
boolean VGV=false
integer array VHV    
real vacumx
real vacumy
integer vacumlvl
unit vacumunit
player rearmp
unit rearmu
integer rearmi
unit clockheal
unit manarestoreu
unit amimage
unit DOOMU
effect DOOME
integer DOOMLVL
real DOOMY

Random fuctions in my map

JASS:
function NPX takes nothing returns boolean
return(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())) and LAV(GetFilterUnit())==false)!=null
endfunction
function NQX takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and GetFilterUnit()!=GetTriggerUnit())!=null
endfunction
function NSX takes nothing returns nothing
local unit p5=GetTriggerUnit()
local real x=GetUnitX(p5)
local real y=GetUnitY(p5)
local group g=KHV()
local integer id=GetPlayerId(GetOwningPlayer(p5))
local integer JFV=GetUnitAbilityLevel(p5,'A0DH')
local integer i=575
local boolexpr b=Condition(function NPX)
if H3V(p5)then
set i=i*2
call DestroyBoolExpr(b)
set b=Condition(function NQX)
endif
if JFV==0 then
set JFV=GetUnitAbilityLevel(p5,'A1OB')
endif
set YZ[id]=CreateUnit(GetOwningPlayer(p5),'e00E',x,y,0)
set zZ[id]=CreateUnit(GetOwningPlayer(p5),'e00E',x,y,0)
set ZZ=JFV
call SetUnitScale(YZ[id],.25,.25,.25)
call UnitAddAbility(YZ[id],'A0DM')
call UnitAddAbility(zZ[id],'A1H0')
call SetUnitAbilityLevel(YZ[id],'A0DM',JFV)
call SetUnitAbilityLevel(zZ[id],'A1H0',JFV)
call GroupEnumUnitsInRange(g,x,y,i,b)
call DestroyBoolExpr(b)
set b=null
call ForGroup(g,function NLX)
if GetUnitAbilityLevel(p5,'A1OB')>0 then
call ForGroup(g,function NMX)
endif
call KGV(g)
set p5=null
set g=null
endfunction
function frv takes nothing returns boolean
if GetSpellAbilityId()=='A0DH' or GetSpellAbilityId()=='A1OB' then
call NSX()
endif
return false
endfunction
function UKV takes nothing returns nothing
call CZV('A0DH',"NSX")
call CZV('A1OB',"NSX")
call L3V('A0DM')
endfunction
function NTX takes nothing returns nothing
call QDV(GetEnumUnit(),.75+.25*GetUnitAbilityLevel(GetTriggerUnit(),'A0SK'),false)
call HPV(GetTriggerUnit(),GetEnumUnit(),1,wl)
endfunction

Now this I under all and well and I do all my coding in jasscraft

Now I tried today to open it newgen ( IT lags like the holy gray) so I can't use it


Now my problem is I want to add this spell to my map


JASS:
//  Author: Tank-Commander                                        //
//  Requires: Dummy.mdl                                           //
//  Purpose: Hero Ultimate, very powerful manipulation ability    //
//                                                                //
//  Notes:                                                        //
//    -  It's a channeling spell                                  //
//    -  Read the readme before you try modifying the config      //
//    -  Use the "Helpful files" to help you import the spell     //
//                                                                //
//  Credits:                                                      //
//    -  (Dummy.mdl) Vexorian                                     //
////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////
//  Chaos Envoy README                                            //
//                                                                //
//  This spell has a lot to configure so this readme will help    //
//  you set up your own Chaos Envoy spell to your liking          //
//  please read this through -fully- before attempting to change  //
//  the configuration                                             //
//                                                                //
//  If your editor does not automatically create variables for    //
//  JASS resources, please enable "automatically create unknown   //
//  variables while pasting trigger data" in the following path:  //
//  File -> Preferences ->  General                               //
//                                                                //
//  Once that is enabled, paste in the Variable Creator           //
//  (it can be deleted afterwards, it's just to create variables  //
//  and serves no other purpose)                                  //
//                                                                //
//  Contents:                                                     //
//                                                                //
//    1-- Setting SpellID and DummyID                             //
//    2-- Timer and Order                                         //
//    3-- AOE                                                     //
//    4-- Magnetism                                               //
//    5-- Aesthetics                                              //
//    6-- Main Damage                                             //
//    7-- Chaos Entity control                                    //
//    8-- Chais Entity damage                                     //
//    9-- Gravity, terrain and units                              //
//   10-- Attack, Damage, and weapon types                        //
//   11-- Unit Indexers                                           //
//                                                                //
//-------------------------------1--------------------------------//
//  Setting SpellID and DummyID:                                  //
//    To do this, find the spell you wish to set as the dummy     //
//    (or unit) then, find the data value of the spell/unit       //
//    if your editor is not already displaying data values then   //
//    you can enable the display by pressing Ctrl + D             //
//    before you panic, pressing Ctrl + D again, will revert the  //
//    the data value you're looking for will be in the unit       //
//    box in the object editor it should look like something      //
//    like this: u000                                             //
//                                                                //
//    there may be something after that like :uloc and then the   //
//    actual name in brackets, but you want this four character   //
//    code. To set it remeber the code and put it between         //
//    these two characters: ' '                                   //
//    e.g.:                                                       //
//      'u000'                                                    //
//                                                                //
//    Now, you can take that, and place it in the respective ID   //
//    return function the line should look like this:             //
//      return 'u000'                                             //
//                                                                //
//    When you have completed this you are ready to move on to    //
//    the next part.                                              //
//                                                                //
//-------------------------------2--------------------------------//
//  Timer and Order:                                              //
//    This spell has two timers and one order, one of the timers  //
//    is for how fast the loop runs, the other, is how long       //
//    after a unit is removed, is the instance recycled           //
//    (it has a timer so that death effects can play)             //
//                                                                //
//    The first timer, will need to be set to something low       //
//    but not below 0.03 to prevent lag, setting it to            //
//    something high (above 0.05) may remove some of the          //
//    smoothness of the effects, it's recommended that you leave  //
//    the value at 0.03, but you may wish to change it            //
//                                                                //
//    The second timer, can technically be any number you like    //
//    and in most cases, it won't make any difference provided    //
//    it's over a second, and if not, the only change is that     //
//    some effects to not display properly due to the unit being  //
//    removed before they finish playing, it is in seconds        //
//    so 1.00 == 1 second, pretty simple and straightforward      //
//                                                                //
//    The order: This is a bit more complex though still fairly   //
//    straightforward, find your spell in the object editor       //
//    you're looking for "Text - Order string - Use/turn on"      //
//    in most cases this should be "channel" because the spell    //
//    needs to be channeled to word, but if you want to change    //
//    it you can, though it's not recommended                     //
//                                                                //
//-------------------------------3--------------------------------//
//  AOE:                                                          //
//    The AOE configurables essentially control the area of the   //
//    magnetism, rather than the spread of the projectiles        //
//    as for the projectiles, that will be covered later          //
//    for now, this section will focus on the magnetism AOE       //
//                                                                //
//    The AOE controls how far away from the portal you can be    //
//    and still be affected by it's AOE, if a unit leaves the     //
//    portal AOE, then it will be dropped by the portal           //
//    The AOE variables ought to manage to keep the projectiles   //
//    within the portal, if it is too small in relation to the    //
//    other factors, the entities will also fall out, as well as  //
//    any units which were taken for the ride                     //
//                                                                //
//    "AOE Central" referrs to the boarders and how far they are  //
//    from the middle of the portal (also how far the entities    //
//    are created from the middle) experimenting with that may    //
//    give some interesting results, but remember the default     //
//    value of 100.00                                             //
//                                                                //
//-------------------------------4--------------------------------//
//  Magnetism:                                                    //
//    The Magnetism values need to be high,the base value should  //
//    be at least 10000.00 for it work correctly, having too      //
//    much magnetism (80000+) may cause some unforseen effects    //
//    Like units flying out of the top of the Map Z height, so    //
//    it's not really recommended (though you never know)         //
//    the increment can be anything really, the magnetism itself  //
//    will however alter the spread of the projectiles and units  //
//    if it is changed, if you want a maintained (or roughly      //
//    maintained pattern) I suggest an increment under 10000.00   //
//                                                                //
//    Magnetism Decay: this works a little differently, unlike    //
//    normal gravity where it is stronger the closer to the       //
//    center, this spell has an inverted gravity, it's stronger   //
//    the further away a unit is, and weaker in the center        //
//    the decay controls how the distance from the target is      //
//    divided up, i.e. the default value is 400                   //
//    say a unit 1200 points apart is in range, the strength of   //
//    the magnetism they experience is:                           //
//      MagnetismStrength * (1200/400) = MagnetismStrength * 3    //
//                                                                //
//    So they experience 3x the normal magnetism strength where   //
//    as if they were at range 400, they'd experience normal      //
//    magnetism, and less if they were even closer than that      //
//                                                                //
//-------------------------------5--------------------------------//
//  Aesthetics:                                                   //
//    There's a large number of aesthetic options available in    //
//    this spell, designed to give the user, the maximum amount   //
//    of options                                                  //
//                                                                //
//    Portal Angle: Controls the pitch angle of the portal, 90    //
//    is the upright position, 0 is on it's side                  //
//    and so on                                                   //
//                                                                //
//    Portal scale: Controls the size of the portal, growing      //
//    rates should be 0.00(i) i.e. 0.005 as to not make the       //
//    the portal grow too large 1 == 100%, 0.001 = 1%             //
//                                                                //
//    Portal Height: Controls how high from the terrain height    //
//    the portal is placed, having a low value here will cause    //
//    projectiles to instantly/quickly hit the ground, and units  //
//    will have lower(or possibly no) arc, will also mean more    //
//    units will be successfully caught by the terrain and not    //
//    pulled if you have TerrainMatters set to true, will also    //
//    effect the AOE of the projectiles (lower to the ground      //
//    means tighter spread, higher up means further apart)        //
//                                                                //
//    Portal/Boarder models: Set these to the model paths of the  //
//    models you desire, if you are getting them from the object  //
//    editor, remember to add a "\" to the pathname everywhere    //
//    there is already one, i.e. "path\path\path.mdl"             //
//    needs to be changed to "path\\path\\path.mdl"               //
//                                                                //
//    Boarder scale works the same way the portal scale does      //
//    so just follow the same steps, 0.25 to 0.50 works well for  //
//    boarders                                                    //
//                                                                //
//    the space taken per segment works in a way that 6.00 means  //
//    you will have 6 boarder pieces, setting to something like   //
//    100.00 will mean 100 segments, a number between 5 and 10    //
//    works well here (as to not flood with effects) keep it      //
//    relative to the scale you set up                            //
//                                                                //
//    Boarder height, again, works in the same way as a portal    //
//    height, should be roughly portal height + 50, but, if it    //
//    better suits your portal model, it can theoretically be     //
//    anything without having any impact to the rest of the       //
//    spell                                                       //
//                                                                //
//    Chaos Entity model: same as the other model sets, with      //
//    the filepaths, also consider that this is a projectile so   //
//    you ought to set it to something which'd work as a          //
//    projectile, like prehaps nether drakes, locusts, rockets    //
//    anything really which isn't a building or a ground unit     //
//                                                                //
//    Chaos Entity scale neednot explain how this works a third   //
//    time                                                        //
//                                                                //
//    Chaos Entity Z control, determines how much Z Velocity      //
//    each entity starts with, this in turn controls how far      //
//    out from the middle it goes and respectively how much       //
//    lower from the middle the projectiles go, setting this to   //
//    0 will mean they maintain their height throughout and do    //
//    not go up/down as normal, default is 6.00, playing around   //
//    with this can have unexpected results, to invert the flow   //
//    use a negative value                                        //
//-------------------------------6--------------------------------//
//  Main Damage:                                                  //
//    These controllers are all for the crush damage dealt by     //
//    units being thrown around by the spell, they do -not-       //
//    effect how much damage each entity does.                    //
//                                                                //
//    All of these are relatively self-explanatory, you can deal  //
//    both health and mana damage with these configurables        //
//    damagetypes/weapontypes/attacktypes are set later which     //
//    will control the multiplyers of all these things            //
//                                                                //
//-------------------------------7--------------------------------//
//  Chaos Entity Control:                                         //
//    These controllers are primarily for controlling the number  //
//    of chaos entities and how fast they appear                  //
//                                                                //
//    ChaosEntityCount: these controllers determine how many      //
//    leak through the portal each cycle of creation, having      //
//    a number higher than 45 at the max level as that will       //
//    cause lag on most machines (especially if multicasted       //
//    or other similar spells are around) 15 is the default at    //
//    level 3, anything under 30 is a relatively safe number      //
//                                                                //
//    ChaosEntityAOE: Controls how much area each missile covers  //
//    upon impact, anywhere from 50-120 is realistic, try to      //
//    keep it relative to the missile size (if it's large         //
//    150-200 may be more appropriate)                            //
//                                                                //
//    ChaosEntityRate: How long (in seconds) there is between     //
//    cycles of ChaosEntity leaks, 1-2 seconds works pretty well  //
//    remember to change the channelling duration of the spell    //
//    to match this (the longer the duration, the more cycled     //
//    leaks)                                                      //
//                                                                //
//-------------------------------8--------------------------------//
//  Chaos Entity Damage:                                          //
//     Like the other fairly straight forward, health and mana    //
//     damage, base and per level values, does not effect the     //
//     main damage (unit throwing around damage) at all, each     //
//     projectile individually will have this damage, it is not   //
//     relative to the distance from the projectile               //
//                                                                //
//-------------------------------9--------------------------------//
//  Gravity, terrain and units:                                   //
//    These control optional features and projectile fall arcs    //
//                                                                //
//    Gravity: This is the strength of the terrain gravity which  //
//    causes entities and units to fall at a given rate, higher   //
//    means a stronger gravity and the faster projectiles come    //
//    back down, 20 is Low gravity, negative numbers are          //
//    Antigrav (you will crash the map doing this, so don't)      //
//    60+ is high gravity, as such these will alter the spread    //
//    and AOE of your projectiles, as this is what determines     //
//    how fast they come back down                                //
//                                                                //
//    TerrainMatters: This function poses a question, do you      //
//    want terrain to matter, or do you want units pulled from    //
//    wherever they are, regardless of the terrain height they    //
//    at it by relativity, changing this to true or false will    //
//    not alter projectile destruction when falling, though will  //
//    when they're in the portal (none will be destroyed until    //
//    they start falling) true will let units brace against the   //
//    ground to prevent being pulled, false will mean they can't  //
//                                                                //
//    EffectsUnits: This function poses a different question, do  //
//    you want units effected at all, or do you just want your    //
//    flurry of projectiles to be the only means of damage, if    //
//    you don't want units to be effected, it's suggested you     //
//    lower the projectile interval time (or increase the         //
//    channeling time) and increase the damage &/or AOE of your   //
//    spell to still give it that ultimate-level power, except    //
//    if you don't intend to use this ability as an ultimate      //
//                                                                //
//------------------------------10--------------------------------//
//  Attack, Damage, and Weapon types:                             //
//    These features will determine your spells damage            //
//    multiplyers, you have controls for all three of these       //
//    things                                                      //
//                                                                //
//    However, knowing all of these different types takes quite   //
//    a bit of knowledge, however they are listed here to make    //
//    it easier:                                                  //
//                                                                //
//    Attack types all start with "ATTACK_TYPE_"                  //
//    CHAOS, HERO, MAGIC, MELEE, NORMAL, PIERCE, SIEGE            //
//                                                                //
//    Damage types all start with "DAMAGE_TYPE_"                  //
//    ACID, COLD, DEATH, DEFENSIVE, DEMOLITION, DISEASE, DIVINE   //
//    ENHANCED, FIRE, FORCE, LIGHTNING, MAGIC, MIND, NORMAL       //
//    PLANT, POSION, SHADOW_STRIKE, SLOW_POISON, SONIC            //
//    SPIRIT_LINK, UNIVERSAL, UNKNOWN                             //
//                                                                //
//    Weapon types all start with "WEAPON_TYPE_"                  //
//    Then add one of the following types:                        //
//    AXE, CLAW, METAL, ROCK, WOOD.                               //
//    Then add one of the classifications (note, some  types do   //
//    not have any of these)                                      //
//    HEAVY, MEDIUM, LIGHT                                        //
//    Then add one of these:                                      //
//    CHOP, SLICE, BASH, STAB                                     //
//                                                                //
//    Remember to include underscores "_" between each word       //
//    and if you don't care for weapon types, you can always use  //
//    WEAPON_TYPE_WHOKNOWS, or even better: null                  //
//                                                                //
//-------------------------------11-------------------------------//
//  Unit Indexers:                                                //
//    general unit indexers, neednot include any of the units     //
//    created by this spell, also, due to the high number of      //
//    entities created, intentionally excluding them, may be      //
//    benefiticial to your map.                                   //
//    to disclude these units from any unit indexer you may have  //
//    you can add this condition:                                 //
//                                                                //
//    and (GetUnitTypeId([unit variable]) != CE_DummyId()) then   //
//                                                                //
//    Adding that line to the end of your selection if statement  //
//    should prevent any of these units being added, remember to  //
//    change "[unit variable]" to match whatever variable you     //
//    stored the unit in i.e. TempUnit, Unit, u, U, etc.          //
//    (disclude the square brackets as well)                      //
//                                                                //
//    if you are using this with a GUI unit indexer, then you     //
//    will need to add some additional lines for this to work:    //
//                                                                //
//    Custom Script: set [variable] = CE_DummyId()                //
//    Custom Script: set [variable2] = GetUnitTypeId(unit)        //
//                                                                //
//    then if your if statement, check that those two variables   //
//    are not the same (also, both variables are integers)        //
//                                                                //
//----------------------------------------------------------------//
//                                                                //
//  That concludes the readme for the CHAOS ENVOY spell           //
//  thank you for reading and enjoy the spell                     //
//                                                                //
////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////
//  Configuration of the spell can be done here, consult the      //
//  readme for more information on how to do this                 //
////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////
//  Controller for the spell to be used as the  //
//  dummy ability and unit as the dummy unit    //
//////////////////////////////////////////////////
constant function CE_SpellID takes nothing returns integer
    return 'A001'
endfunction

constant function CE_DummyID takes nothing returns integer
    return 'u000'
endfunction

//////////////////////////////////////////////////
//  Controller for the timer speed (0.03 is     //
//  the standard timeout)                       //
//////////////////////////////////////////////////
constant function CE_TimerSpeed takes nothing returns real
    return 0.03
endfunction

//////////////////////////////////////////////////
//  Controller for how long a unit lasts        //
//  after it's usefulness has expired           //
//  (mostly for effects to play)                //
//////////////////////////////////////////////////
constant function CE_DeathTimer takes nothing returns real
    return 2.00
endfunction

//////////////////////////////////////////////////
//  Controller for the order attached to the    //
//  Dummy ability                               //
//////////////////////////////////////////////////
constant function CE_Order takes nothing returns integer
    return OrderId("channel")
endfunction

//////////////////////////////////////////////////
//  Controllers for the Portal AOE (magnetism)  //
//  projectiles will ignore this AOE other      //
//  than for staying attached to the portal     //
//  until it disappates, if this value is       //
//  too small, projectiles will "fall out"      //
//////////////////////////////////////////////////
constant function CE_AOEBase takes nothing returns real
    return 250.00
endfunction

constant function CE_AOEPerLevel takes nothing returns real
    return 100.00
endfunction

//////////////////////////////////////////////////
// Controllers for the centre of the portal     //
//////////////////////////////////////////////////
constant function CE_AOECentral takes nothing returns real
    return 100.00
endfunction
//////////////////////////////////////////////////
//  Controllers for the magnetism strength      //
//  of the portal (playing around may give      //
//  odd results)                                //
//////////////////////////////////////////////////
constant function CE_MagnetismBase takes nothing returns real
    return 30000.00
endfunction

constant function CE_MagnetismPerLevel takes nothing returns real
    return 7500.00
endfunction

//////////////////////////////////////////////////
//  Controllerfor the Magnetism decay, this is  //
//  how far from the portal, until a larger     //
//  proportion of magnetism is used             //
//  (exponential)                               //
//////////////////////////////////////////////////
constant function CE_MagnetismDecay takes nothing returns real
    return 400.00
endfunction

//////////////////////////////////////////////////
//  Constrollers for the portal aesthetics      //
//////////////////////////////////////////////////

//////////////////////////////////////////////////
//  Constroller for the angle of the model      //
//  (90 is upright)                             //
//////////////////////////////////////////////////
constant function CE_PortalAngle takes nothing returns integer
    return 90
endfunction

//////////////////////////////////////////////////
//  Controllers for the scale of the portal     //
//////////////////////////////////////////////////
constant function CE_PortalStartScale takes nothing returns real
    return 2.00
endfunction

constant function CE_PortalGrowthRateBase takes nothing returns real
    return 0.003
endfunction

constant function CE_PortalGrowthRatePerLevel takes nothing returns real
    return 0.002
endfunction

//////////////////////////////////////////////////
//  Controller for how heigh up the portal is   //
//  (will change how units/projectiles behave   //
//  with the portal)                            //
//////////////////////////////////////////////////
constant function CE_PortalHeight takes nothing returns real
    return 400.00
endfunction

//////////////////////////////////////////////////
//  Controllers for the models used for the     //
//  portal and it's boarders                    //
//////////////////////////////////////////////////
constant function CE_PortalModel takes nothing returns string
    return "Abilities\\Spells\\Undead\\Possession\\PossessionCaster.mdl"
endfunction

constant function CE_PortalBoarderModel takes nothing returns string
    return "Abilities\\Spells\\Undead\\AntiMagicShell\\AntiMagicShell.mdl"
endfunction

//////////////////////////////////////////////////
//  Controller for the size of the boarders     //
//////////////////////////////////////////////////
constant function CE_PortalBoarderScale takes nothing returns real
    return 0.25
endfunction

//////////////////////////////////////////////////
//  Controller for how many boarder segments    //
//  the spell has (6.00 gives 6 boarders)       //
//////////////////////////////////////////////////
constant function CE_PortalBoarderSpaceTakenPerSegment takes nothing returns real
    return 6.00
endfunction

//////////////////////////////////////////////////
//  Controller for how heigh the boarders of    //
//  the portal are set (should be about the     //
//  height of the poral + 50)                   //
//////////////////////////////////////////////////
constant function CE_PortalBoarderHeight takes nothing returns real
    return 450.00
endfunction

//////////////////////////////////////////////////
//  Controllers for the size of the projectiles //
//////////////////////////////////////////////////
constant function CE_ChaosEntityScaleBase takes nothing returns real
    return 0.75
endfunction

constant function CE_ChaosEntityScalePerLevel takes nothing returns real
    return 0.00
endfunction

//////////////////////////////////////////////////
//  Controller for the models of the            //
//  projectiles                                 //
//////////////////////////////////////////////////
constant function CE_ChaosEntityModel takes nothing returns string
    return "Abilities\\Spells\\Undead\\OrbOfDeath\\AnnihilationMissile.mdl"
endfunction

//////////////////////////////////////////////////
//  Controller for the initial z velocity of    //
//  chaos entities, changes the aesthetic look  //
//  and the damage spread of the spell          //
//////////////////////////////////////////////////
constant function CE_ChaosEntityZControl takes nothing returns real
    return 6.00
endfunction

//////////////////////////////////////////////////
//  End of the aesthetics configuration         //
//////////////////////////////////////////////////

//////////////////////////////////////////////////
//  Controllers for spell damage                //
//  (Non projectile)                            //
//////////////////////////////////////////////////
constant function CE_HealthDamageBase takes nothing returns real
    return 200.00
endfunction

constant function CE_HealthDamagePerLevel takes nothing returns real
    return 50.00
endfunction

constant function CE_ManaDamageBase takes nothing returns real
    return 0.00
endfunction

constant function CE_ManaDamagePerLevel takes nothing returns real
    return 0.00
endfunction

//////////////////////////////////////////////////
//  Controllers for the number of projectiles   //
//  generated by the spell per cycle            //
//////////////////////////////////////////////////
constant function CE_ChaosEntityCountBase takes nothing returns integer
    return 0
endfunction

constant function CE_ChaosEntityCountPerLevel takes nothing returns integer
    return 5
endfunction

//////////////////////////////////////////////////
//  Controller for the AOE of the chaos         //
//  entities                                    //
//////////////////////////////////////////////////
constant function CE_ChaosEntityAOE takes nothing returns real
    return 125.00
endfunction

//////////////////////////////////////////////////
//  Controller for the Chaos entity creation    //
//  rate (in seconds)                           //
//////////////////////////////////////////////////

constant function CE_ChaosEntityRate takes nothing returns real
    return 1.50
endfunction

//////////////////////////////////////////////////
//  Controllers for the damage dealt by the     //
//  Projectiles                                 //
//////////////////////////////////////////////////
constant function CE_ChaosEntityHealthDamageBase takes nothing returns real
    return 50.00
endfunction

constant function CE_ChaosEntityHealthDamagePerLevel takes nothing returns real
    return 20.00
http://www.hiveworkshop.com/forums/...v1-02-a-235740/?prev=c=113&r=20&d=list&page=2

I would like to know why is there constant and private in front of the function? I not seen this or ever used it in my map
 
Level 22
Joined
Sep 24, 2005
Messages
4,821
The constant keyword is available in jass, its used for restricting some features of the function (I don't know exactly, but some native functions can't be used) but is faster (I have no benchmarks to prove this) when executing the code.

The private keyword is a vjass feature, it won't be present in the processed war3map.j since it's not a valid jass keyword.

How come your variables are of 2-character length, man you're good.
 
Level 2
Joined
Dec 14, 2012
Messages
20
The constant keyword is available in jass, its used for restricting some features of the function (I don't know exactly, but some native functions can't be used) but is faster (I have no benchmarks to prove this) when executing the code.

The private keyword is a vjass feature, it won't be present in the processed war3map.j since it's not a valid jass keyword.

How come your variables are of 2-character length, man you're good.

I see , this is the first time using stuff on this forum (code that is )

now and then If my code is clean of bug and the map is stable I run my warmap.j through a confucklator ;D Makes it almost impossible to decode
 
Level 11
Joined
Oct 11, 2012
Messages
711
The constant keyword is available in jass, its used for restricting some features of the function (I don't know exactly, but some native functions can't be used) but is faster (I have no benchmarks to prove this) when executing the code.

The private keyword is a vjass feature, it won't be present in the processed war3map.j since it's not a valid jass keyword.

How come your variables are of 2-character length, man you're good.

Vexorian's map optimizer can compress function and variable names.

To DTBA:
constant variables cannot be changed; as to private variables or functions, they are related to vJass, you need JassHelper to compile them.
国人?
 
Status
Not open for further replies.
Top