modifying attribute points

jig7c

Stop reading me...-statement
Reaction score
123
i want it so that everytime a HERO kils a Neutral Hostile creep, the hero gains +2 to either Agi, Int, or Str, randomly picked and applied to hero's stats..

i could create a tome, but then the hero has to pick it up.. i don't want that...

how do i do it?
here is what i got so far?
i dont know if this is correct or not...

this is also my first JASS trigger, so i dont know if i did it correctly or not, most likely i didn't... but if someone can check up on it and let me know where i messed up, that would be great!

i know the conditions are not that good! but i dont' know how to write conditions, so i had to convert that from GUI!

using UnitProperties
JASS:
function Attribute_Conditions takes nothing returns boolean
    if ( not ( IsUnitEnemy(GetKillingUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true ) ) then
        return false
    endif
    if ( not ( IsUnitType(GetKillingUnit(), UNIT_TYPE_HERO) == true ) ) then
        return false
    endif
    return true
endfunction

function Attribute_Actions takes nothing returns nothing
    local unit u //creating unit var for later use
    local integer i //creating integer for random attribute
    local texttag t = CreateTextTag () //floating text
    local integer a = 0 //attribute array start with 0
    local integer array Attribute //creating integer[array] for the attributes
    set Attribute[a+1] = bj_HEROSTAT_STR //setting array 1 to strenght
    set Attribute[a+2] = bj_HEROSTAT_AGI //setting array 2 to agility
    set Attribute[a+3] = bj_HEROSTAT_INT //setting array 3 to intellligence
    set u = GetKillingUnit //setting u to killing unit
    set i = Attribute[GetRandomInt(1,3)] //picking a random array to give bonus to
    //showing a floating text over killing unit, based on the bonus given!!
    //Strenght
    if (i == 1) then
    UnitModifyStr (u, 2) //adding the bonus
    set t = CreateTextTagUnitBJ(( "+2 Strenght", u, 0, 10, 100, 100, 100, 0 )
    call SetTextTagPermanent (t, false)
    call SetTextTagLifespan (t, 2.00)
    call SetTextTagVelocityBJ (t, 64, 90 )
    call SetTextTagFadepoint (t, 2.00 )
    endif
    //Agility
    if (i ==2) then
    UnitModifyAgi (u, 2) //adding the bonus
    set t = CreateTextTagUnitBJ(( "+2 Agility", u, 0, 10, 100, 100, 100, 0 )
    call SetTextTagPermanent (t, false)
    call SetTextTagLifespan (t, 2.00)
    call SetTextTagVelocityBJ (t, 64, 90 )
    call SetTextTagFadepoint (t, 2.00 )
    endif
    // Intelligence
    if (i ==3) then
    UnitModifyInt (u, 2) //adding the bonus
    set t = CreateTextTagUnitBJ(( "+2 Intelligence ", u, 0, 10, 100, 100, 100, 0 )
    call SetTextTagPermanent (t, false)
    call SetTextTagLifespan (t, 2.00)
    call SetTextTagVelocityBJ (t, 64, 90 )
    call SetTextTagFadepoint (t, 2.00 )
    endif
    set u = null //removing unit from var
endfunction

//===========================================================================
function InitTrig_Jass takes nothing returns nothing
    set t = CreateTrigger()
    call TriggerRegisterPlayerUnitEventSimple( t, Player(PLAYER_NEUTRAL_AGGRESSIVE), EVENT_PLAYER_UNIT_DEATH )
    call TriggerAddCondition(t, function Attribute_Conditions)
    call TriggerAddAction( t, function Attribute_Actions)
endfunction
 

Komaqtion

You can change this now in User CP.
Reaction score
469
This should work for you...

JASS:
function Attribute_Conditions takes nothing returns boolean
    return IsUnitEnemy(GetKillingUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) and IsUnitType(GetKillingUnit(), UNIT_TYPE_HERO)
endfunction

function Attribute_Actions takes nothing returns nothing
    local unit u = GetKillingUnit()
    local integer i //creating integer for random attribute
    local texttag t = CreateTextTag () //floating text
    local integer a = 0 //attribute array start with 0
    local integer array Attribute //creating integer[array] for the attributes
    
    set Attribute[a+1] = bj_HEROSTAT_STR //setting array 1 to strenght
    set Attribute[a+2] = bj_HEROSTAT_AGI //setting array 2 to agility
    set Attribute[a+3] = bj_HEROSTAT_INT //setting array 3 to intellligence
    set i = Attribute[GetRandomInt(1,3)] //picking a random array to give bonus to
    //showing a floating text over killing unit, based on the bonus given!!
    
    //Strenght
    
    if (i == 1) then
        call UnitModifyStr(u, 2) //adding the bonus
        call SetTextTagPosUnit( t, u, 0, 10 )
        call SetTextTagText( t, "+2 Strength", 0.023 )
        call SetTextTagColor( t, 255, 255, 255, 0 )
        call SetTextTagPermanent (t, false)
        call SetTextTagLifespan (t, 2.00)
        call SetTextTagVelocity( t, 0.0355 * Cos( 90. * bj_DEGTORAD ), 0.0355 * Sin( 90. * bj_DEGTORAD ) )
        call SetTextTagFadepoint (t, 2.00 )
    endif
    
    //Agility
    
    if (i == 2) then
        call UnitModifyAgi(u, 2) //adding the bonus
        call SetTextTagPosUnit( t, u, 0, 10 )
        call SetTextTagText( t, "+2 Agility", 0.023 )
        call SetTextTagColor( t, 255, 255, 255, 0 )
        call SetTextTagPermanent (t, false)
        call SetTextTagLifespan (t, 2.00)
        call SetTextTagVelocity( t, 0.0355 * Cos( 90. * bj_DEGTORAD ), 0.0355 * Sin( 90. * bj_DEGTORAD ) )
        call SetTextTagFadepoint (t, 2.00 )
    endif
    
    // Intelligence
    
    if (i == 3) then
        call UnitModifyStr(u, 2) //adding the bonus
        call SetTextTagPosUnit( t, u, 0, 10 )
        call SetTextTagText( t, "+2 Intelligence", 0.023 )
        call SetTextTagColor( t, 255, 255, 255, 0 )
        call SetTextTagPermanent (t, false)
        call SetTextTagLifespan (t, 2.00)
        call SetTextTagVelocity( t, 0.0355 * Cos( 90. * bj_DEGTORAD ), 0.0355 * Sin( 90. * bj_DEGTORAD ) )
        call SetTextTagFadepoint (t, 2.00 )
    endif

    set u = null //removing unit from var
endfunction

//===========================================================================
function InitTrig_Jass takes nothing returns nothing
    local trigger t = CreateTrigger()
    
    // set t = CreateTrigger() &lt;=== An error here, &quot;t&quot; was never declared, as above <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite2" alt=";)" title="Wink    ;)" loading="lazy" data-shortname=";)" />
    
    call TriggerRegisterPlayerUnitEvent( t, Player( 12 ), EVENT_PLAYER_UNIT_DEATH, null )
    call TriggerAddCondition( t, function Attribute_Conditions )
    call TriggerAddAction( t, function Attribute_Actions )
endfunction
 

jig7c

Stop reading me...-statement
Reaction score
123
>komaqtion
would you say that my jass script is any good for it being my very first Jass script...
im so excited about this now!!

p.s. thanks for fixing it!

edit: i have modified the code again!
see if this is better than the previous post!
JASS:
function Attribute_Conditions takes nothing returns boolean
    return IsUnitEnemy(GetKillingUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) and IsUnitType(GetKillingUnit(), UNIT_TYPE_HERO)
endfunction

function Attribute_Actions takes nothing returns nothing
    local unit u = GetKillingUnit()
    local integer i = GetRandomInt(1,4)//creating integer for random attribute
    local texttag t = CreateTextTag () //floating text
    //showing a floating text over killing unit, based on the bonus given!!
    
    //Strenght
    
    if (i == 1) then
        call UnitModifyStr(u, 2) //adding the bonus
        call SetTextTagPosUnit( t, u, 0, 10 )
        call SetTextTagText( t, &quot;+2 Strength&quot;, 0.023 )
        call SetTextTagColor( t, 255, 255, 255, 0 )
        call SetTextTagPermanent (t, false)
        call SetTextTagLifespan (t, 2.00)
        call SetTextTagVelocity( t, 0.0355 * Cos( 90. * bj_DEGTORAD ), 0.0355 * Sin( 90. * bj_DEGTORAD ) )
        call SetTextTagFadepoint (t, 2.00 )
    endif
    
    //Agility
    
    if (i == 2) then
        call UnitModifyAgi(u, 2) //adding the bonus
        call SetTextTagPosUnit( t, u, 0, 10 )
        call SetTextTagText( t, &quot;+2 Agility&quot;, 0.023 )
        call SetTextTagColor( t, 255, 255, 255, 0 )
        call SetTextTagPermanent (t, false)
        call SetTextTagLifespan (t, 2.00)
        call SetTextTagVelocity( t, 0.0355 * Cos( 90. * bj_DEGTORAD ), 0.0355 * Sin( 90. * bj_DEGTORAD ) )
        call SetTextTagFadepoint (t, 2.00 )
    endif
    
    // Intelligence
    
    if (i == 3) then
        call UnitModifyInt(u, 2) //adding the bonus
        call SetTextTagPosUnit( t, u, 0, 10 )
        call SetTextTagText( t, &quot;+2 Intelligence&quot;, 0.023 )
        call SetTextTagColor( t, 255, 255, 255, 0 )
        call SetTextTagPermanent (t, false)
        call SetTextTagLifespan (t, 2.00)
        call SetTextTagVelocity( t, 0.0355 * Cos( 90. * bj_DEGTORAD ), 0.0355 * Sin( 90. * bj_DEGTORAD ) )
        call SetTextTagFadepoint (t, 2.00 )
    endif

    if (i == 4) then
        call UnitModifyStr (u, 1)
        call UnitModifyAgi (u, 1)
        call UnitModifyInt (u, 1)
        call SetTextTagPosUnit( t, u, 0, 10 )
        call SetTextTagText( t, &quot;+1 All Stats&quot;, 0.023 )
        call SetTextTagColor( t, 255, 255, 255, 0 )
        call SetTextTagPermanent (t, false)
        call SetTextTagLifespan (t, 2.00)
        call SetTextTagVelocity( t, 0.0355 * Cos( 90. * bj_DEGTORAD ), 0.0355 * Sin( 90. * bj_DEGTORAD ) )
        call SetTextTagFadepoint (t, 2.00 )
    endif
    
    set u = null //removing unit from var
endfunction

//===========================================================================
function InitTrig_Attribute takes nothing returns nothing
    local trigger t = CreateTrigger()
    call TriggerRegisterPlayerUnitEvent( t, Player( 12 ), EVENT_PLAYER_UNIT_DEATH, null )
    call TriggerAddCondition( t, function Attribute_Conditions )
    call TriggerAddAction( t, function Attribute_Actions )
endfunction
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Yeah, sure ;)
That looks better too me ;)
(Not that much, but a little ;))
 

tooltiperror

Super Moderator
Reaction score
231
i want it so that everytime a HERO kils a Neutral Hostile creep, the hero gains +2 to either Agi, Int, or Str, randomly picked and applied to hero's stats..

i could create a tome, but then the hero has to pick it up.. i don't want that...

how do i do it?
here is what i got so far?
i dont know if this is correct or not...

this is also my first JASS trigger, so i dont know if i did it correctly or not, most likely i didn't... but if someone can check up on it and let me know where i messed up, that would be great!

i know the conditions are not that good! but i dont' know how to write conditions, so i had to convert that from GUI!

using UnitProperties
JASS:

function Attribute_Conditions takes nothing returns boolean
    if ( not ( IsUnitEnemy(GetKillingUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true ) ) then
        return false
    endif
    if ( not ( IsUnitType(GetKillingUnit(), UNIT_TYPE_HERO) == true ) ) then
        return false
    endif
    return true
endfunction

function Attribute_Actions takes nothing returns nothing
    local unit u //creating unit var for later use
    local integer i //creating integer for random attribute
    local texttag t = CreateTextTag () //floating text
    local integer a = 0 //attribute array start with 0
    local integer array Attribute //creating integer[array] for the attributes
    set Attribute[a+1] = bj_HEROSTAT_STR //setting array 1 to strenght
    set Attribute[a+2] = bj_HEROSTAT_AGI //setting array 2 to agility
    set Attribute[a+3] = bj_HEROSTAT_INT //setting array 3 to intellligence
    set u = GetKillingUnit //setting u to killing unit
    set i = Attribute[GetRandomInt(1,3)] //picking a random array to give bonus to
    //showing a floating text over killing unit, based on the bonus given!!
    //Strenght
    if (i == 1) then
    UnitModifyStr (u, 2) //adding the bonus
    set t = CreateTextTagUnitBJ(( &quot;+2 Strenght&quot;, u, 0, 10, 100, 100, 100, 0 )
    call SetTextTagPermanent (t, false)
    call SetTextTagLifespan (t, 2.00)
    call SetTextTagVelocityBJ (t, 64, 90 )
    call SetTextTagFadepoint (t, 2.00 )
    endif
    //Agility
    if (i ==2) then
    UnitModifyAgi (u, 2) //adding the bonus
    set t = CreateTextTagUnitBJ(( &quot;+2 Agility&quot;, u, 0, 10, 100, 100, 100, 0 )
    call SetTextTagPermanent (t, false)
    call SetTextTagLifespan (t, 2.00)
    call SetTextTagVelocityBJ (t, 64, 90 )
    call SetTextTagFadepoint (t, 2.00 )
    endif
    // Intelligence
    if (i ==3) then
    UnitModifyInt (u, 2) //adding the bonus
    set t = CreateTextTagUnitBJ(( &quot;+2 Intelligence &quot;, u, 0, 10, 100, 100, 100, 0 )
    call SetTextTagPermanent (t, false)
    call SetTextTagLifespan (t, 2.00)
    call SetTextTagVelocityBJ (t, 64, 90 )
    call SetTextTagFadepoint (t, 2.00 )
    endif
    set u = null //removing unit from var
endfunction

//===========================================================================
function InitTrig_Jass takes nothing returns nothing
    set t = CreateTrigger()
    call TriggerRegisterPlayerUnitEventSimple( t, Player(PLAYER_NEUTRAL_AGGRESSIVE), EVENT_PLAYER_UNIT_DEATH )
    call TriggerAddCondition(t, function Attribute_Conditions)
    call TriggerAddAction( t, function Attribute_Actions)
endfunction

You used about 5 BJ's. You should really remove them.
 

jig7c

Stop reading me...-statement
Reaction score
123
>ToolTipError
>Laiev
look at this post and then tell me if this jass script is better than the one in the first one...

the BJs are removed...
 

tooltiperror

Super Moderator
Reaction score
231
Code:
function Attribute_Conditions takes nothing returns boolean
    return  IsUnitEnemy(GetKillingUnit(), 
endfunction
 

the Immortal

I know, I know...
Reaction score
51
You can shorten the code further by taking most of the TextTag-related functions out of the 'if's since they are the same for all cases.
Also, use elseif instead of endif .. if, since i cannot be both 1 and 2 for ex.
The texttag var should be nulled as well, afaik.

Final result should be something like this:
JASS:
function Attribute_Conditions takes nothing returns boolean
    return IsUnitEnemy(GetKillingUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) and IsUnitType(GetKillingUnit(), UNIT_TYPE_HERO)
endfunction

function Attribute_Actions takes nothing returns nothing
    local unit u = GetKillingUnit()
    local integer i = GetRandomInt(1,4)//creating integer for random attribute
    local texttag t = CreateTextTag () //floating text

    //showing a floating text over killing unit, based on the bonus given!!

    if (i == 1) then        //Strength
        call UnitModifyStr(u, 2) //adding the bonus
        call SetTextTagText( t, &quot;+2 Strength&quot;, 0.023 )
    elseif (i == 2) then    //Agility
        call UnitModifyAgi(u, 2) //adding the bonus
        call SetTextTagText( t, &quot;+2 Agility&quot;, 0.023 )
    elseif (i == 3) then    // Intelligence
        call UnitModifyInt(u, 2) //adding the bonus
        call SetTextTagText( t, &quot;+2 Intelligence&quot;, 0.023 )
    elseif (i == 4) then    // All
        call UnitModifyStr (u, 1)
        call UnitModifyAgi (u, 1)
        call UnitModifyInt (u, 1)
        call SetTextTagText( t, &quot;+1 All Stats&quot;, 0.023 )
    endif
    
    call SetTextTagPosUnit( t, u, 0, 10 )
    call SetTextTagColor( t, 255, 255, 255, 0 )
    call SetTextTagPermanent (t, false)
    call SetTextTagLifespan (t, 2.00)
    call SetTextTagVelocity( t, 0.0355 * Cos( 90. * bj_DEGTORAD ), 0.0355 * Sin( 90. * bj_DEGTORAD ) )
    call SetTextTagFadepoint (t, 2.00 )

    set t = null
    set u = null //removing unit from var
endfunction

//===========================================================================
function InitTrig_Attribute takes nothing returns nothing
    local trigger t = CreateTrigger()
    call TriggerRegisterPlayerUnitEvent( t, Player( 12 ), EVENT_PLAYER_UNIT_DEATH, null )
    call TriggerAddCondition( t, function Attribute_Conditions )
    call TriggerAddAction( t, function Attribute_Actions )
endfunction
 

Laiev

Hey Listen!!
Reaction score
188
you can make all the texttags a private function and just call it inside each other, just make 5 or 6 call in one.
 

jig7c

Stop reading me...-statement
Reaction score
123
i don't know how to use private/public constants/functions...

like i said, this is my very first jass script!
 

Laiev

Hey Listen!!
Reaction score
188
i don't know how to use private/public constants/functions...

like i said, this is my very first jass script!

private function is like... just that trigger will got, no matter what you do, you can't call that trigger, so you can use any name of that function..

public function is like... a normal function, but with a prefix of the library/scope name. example:

JASS:
scope hey
public function bye takes nothing returns nothing
endfunction
endscope


JASS:
function test takes nothing returns nothing
    call hey_bye
endfunction


hey = name of scope/library
bye = name of function

PS: this is just a example -.- noone need to fix it, kthx :rolleyes:

constant is what name say, constant, never change, the value will be ever that what you set/do.

just a add... private/public function just is allowed inside scope or library
 

jig7c

Stop reading me...-statement
Reaction score
123
here is my trigger, and it is still not working..
whats seem to be the problem...


JASS:
function Attribute_Conditions takes nothing returns boolean
    return IsUnitEnemy(GetKillingUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) and IsUnitType(GetKillingUnit(), UNIT_TYPE_HERO)
endfunction

function Attribute_Actions takes nothing returns nothing
    local unit u = GetKillingUnit()
    local integer i = GetRandomInt(1,4)//creating integer for random attribute
    local texttag t = CreateTextTag () //floating text
    //showing a floating text over killing unit, based on the bonus given!!
    
    //Strenght
    
    if (i == 1) then
        call UnitModifyStr(u, 2) //adding the bonus
        call SetTextTagPosUnit( t, u, 10 )
        call SetTextTagText( t, &quot;+2 Strength&quot;, 0.023 )
        call SetTextTagColor( t, 10, 255, 255, 0 )
        call SetTextTagPermanent (t, false)
        call SetTextTagLifespan (t, 2.00)
        call SetTextTagVelocity( t, 0.0355 * Cos( 90. * bj_DEGTORAD ), 0.0355 * Sin( 90. * bj_DEGTORAD ) )
        call SetTextTagFadepoint (t, 2.00 )
    elseif (i == 2) then//Agility
        call UnitModifyAgi(u, 2) //adding the bonus
        call SetTextTagPosUnit( t, u, 10 )
        call SetTextTagText( t, &quot;+2 Agility&quot;, 0.023 )
        call SetTextTagColor( t, 255, 10, 255, 0 )
        call SetTextTagPermanent (t, false)
        call SetTextTagLifespan (t, 2.00)
        call SetTextTagVelocity( t, 0.0355 * Cos( 90. * bj_DEGTORAD ), 0.0355 * Sin( 90. * bj_DEGTORAD ) )
        call SetTextTagFadepoint (t, 2.00 )
    elseif (i == 3) then  // Intelligence
        call UnitModifyInt(u, 2) //adding the bonus
        call SetTextTagPosUnit( t, u, 10 )
        call SetTextTagText( t, &quot;+2 Intelligence&quot;, 0.023 )
        call SetTextTagColor( t, 255, 255, 10, 0 )
        call SetTextTagPermanent (t, false)
        call SetTextTagLifespan (t, 2.00)
        call SetTextTagVelocity( t, 0.0355 * Cos( 90. * bj_DEGTORAD ), 0.0355 * Sin( 90. * bj_DEGTORAD ) )
        call SetTextTagFadepoint (t, 2.00 )
    elseif (i == 4) then //All Stats
        call UnitModifyStr (u, 1)
        call UnitModifyAgi (u, 1)
        call UnitModifyInt (u, 1)
        call SetTextTagPosUnit( t, u, 10 )
        call SetTextTagText( t, &quot;+1 All Stats&quot;, 0.023 )
        call SetTextTagColor( t, 200, 10, 50, 0 )
        call SetTextTagPermanent (t, false)
        call SetTextTagLifespan (t, 2.00)
        call SetTextTagVelocity( t, 0.0355 * Cos( 90. * bj_DEGTORAD ), 0.0355 * Sin( 90. * bj_DEGTORAD ) )
        call SetTextTagFadepoint (t, 2.00 )
    endif
    
    set u = null //removing unit from var
    set t = null
endfunction

//===========================================================================
function Init takes nothing returns nothing
    local trigger k = CreateTrigger()
    call TriggerRegisterPlayerUnitEvent( k, Player( 12 ), EVENT_PLAYER_UNIT_DEATH, null )
    call TriggerAddCondition( k, Condition( function Attribute_Conditions) )
    call TriggerAddAction( k, function Attribute_Actions )
endfunction
 

Lehona

New Member
Reaction score
12
Your trigger is not initialized correctly - you need a scope (Or name the init-function: "InitTrig_<Triggername>" (iirc)). Do it like this:

JASS:
scope AttributeModifier initializer Init
function Attribute_Conditions takes nothing returns boolean
    return IsUnitEnemy(GetKillingUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) and IsUnitType(GetKillingUnit(), UNIT_TYPE_HERO)
endfunction

function Attribute_Actions takes nothing returns nothing
    local unit u = GetKillingUnit()
    local integer i = GetRandomInt(1,4)//creating integer for random attribute
    local texttag t = CreateTextTag () //floating text
    //showing a floating text over killing unit, based on the bonus given!!
    
    //Strenght
    
    if (i == 1) then
        call UnitModifyStr(u, 2) //adding the bonus
        call SetTextTagPosUnit( t, u, 10 )
        call SetTextTagText( t, &quot;+2 Strength&quot;, 0.023 )
        call SetTextTagColor( t, 10, 255, 255, 0 )
        call SetTextTagPermanent (t, false)
        call SetTextTagLifespan (t, 2.00)
        call SetTextTagVelocity( t, 0.0355 * Cos( 90. * bj_DEGTORAD ), 0.0355 * Sin( 90. * bj_DEGTORAD ) )
        call SetTextTagFadepoint (t, 2.00 )
    elseif (i == 2) then//Agility
        call UnitModifyAgi(u, 2) //adding the bonus
        call SetTextTagPosUnit( t, u, 10 )
        call SetTextTagText( t, &quot;+2 Agility&quot;, 0.023 )
        call SetTextTagColor( t, 255, 10, 255, 0 )
        call SetTextTagPermanent (t, false)
        call SetTextTagLifespan (t, 2.00)
        call SetTextTagVelocity( t, 0.0355 * Cos( 90. * bj_DEGTORAD ), 0.0355 * Sin( 90. * bj_DEGTORAD ) )
        call SetTextTagFadepoint (t, 2.00 )
    elseif (i == 3) then  // Intelligence
        call UnitModifyInt(u, 2) //adding the bonus
        call SetTextTagPosUnit( t, u, 10 )
        call SetTextTagText( t, &quot;+2 Intelligence&quot;, 0.023 )
        call SetTextTagColor( t, 255, 255, 10, 0 )
        call SetTextTagPermanent (t, false)
        call SetTextTagLifespan (t, 2.00)
        call SetTextTagVelocity( t, 0.0355 * Cos( 90. * bj_DEGTORAD ), 0.0355 * Sin( 90. * bj_DEGTORAD ) )
        call SetTextTagFadepoint (t, 2.00 )
    elseif (i == 4) then //All Stats
        call UnitModifyStr (u, 1)
        call UnitModifyAgi (u, 1)
        call UnitModifyInt (u, 1)
        call SetTextTagPosUnit( t, u, 10 )
        call SetTextTagText( t, &quot;+1 All Stats&quot;, 0.023 )
        call SetTextTagColor( t, 200, 10, 50, 0 )
        call SetTextTagPermanent (t, false)
        call SetTextTagLifespan (t, 2.00)
        call SetTextTagVelocity( t, 0.0355 * Cos( 90. * bj_DEGTORAD ), 0.0355 * Sin( 90. * bj_DEGTORAD ) )
        call SetTextTagFadepoint (t, 2.00 )
    endif
    
    set u = null //removing unit from var
    set t = null
endfunction

//===========================================================================
function Init takes nothing returns nothing
    local trigger k = CreateTrigger()
    call TriggerRegisterPlayerUnitEvent( k, Player( 12 ), EVENT_PLAYER_UNIT_DEATH, null )
    call TriggerAddCondition( k, Condition( function Attribute_Conditions) )
    call TriggerAddAction( k, function Attribute_Actions )
endfunction
endscope


(Didn't look over the code, though)
 

jig7c

Stop reading me...-statement
Reaction score
123
it says, when saving the map..

Unable to find initializer: Init

and the endscope line is highlighted..
 

Laiev

Hey Listen!!
Reaction score
188
update your jasshelper?

here just get syntax error of those call function "UnitModifyX" etc.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +1
  • V-SNES V-SNES:
    Happy Friday!
    +1

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top