wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Resources > Code Resources > Spells
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 02-06-2007, 06:08 PM   #1
moyack
Evil Emoticon
 
moyack's Avatar


Respected User
Project Leader: PoC
 
Join Date: Jan 2006
Posts: 3,263

Submissions (17)

moyack is a splendid one to behold (658)moyack is a splendid one to behold (658)moyack is a splendid one to behold (658)moyack is a splendid one to behold (658)

AI Tournament #2 - 2nd PlaceHero Contest - Second place

Send a message via MSN to moyack
Default Cursed Soul

NOTE: You have been redirected in order for our attachments to be made available to you. This will only last two minutes; these measures where taken to avoid hotlinking and bandwidth theft.
To avoid these restrictions Log in or Register

Hi:

This is a spell made for the Zephyr Challenge #1 spell contest at the hive workshop. This spell complies with JESP.

Cursed Soul.

By Moyack.
Version 1.0.
January 2007.
Click image for larger version

Name:	WC3ScrnShot_020607_181410_04.jpg
Views:	769
Size:	307.4 KB
ID:	20562

Description:
Takes the soul from a near corpse, forcing it to possess a random enemy land unit. If that unit is different to the cursed soul, it will deal damage to the unit, else it will take control of that unit temporally, draining its life.

If the soul can't get any enemy unit, it will follow the caster until it can accomplish its evil task.

Level 1 - Deals 15% of soul's maximum hitpoints or control the enemy for 20 Seconds.
Level 2 - Deals 25% of soul's maximum hitpoints or control the enemy for 30 Seconds.
Level 3 - Deals 35% of soul's maximum hitpoints or control the enemy for 40 Seconds.

Source code

Collapse JASS:
//******************************************************************************
//*                                                                            *
//*                              Cursed Soul Spell                             *
//*                                 By Moyack                                  *
//*                                Version 1.0                                 *
//*                                                                            *
//******************************************************************************

//******************************************************************************
//* The constant functions where you can modify the ability properties
//*
constant function Cursed_Soul_SpellID takes nothing returns integer
    // Returns the spell ID. Based on Raise Dead ability.
    return 'A000'
endfunction

constant function Cursed_Soul_LifeStolen takes integer level returns real
    // Returns the percentge of life stolen to a random unit
    return 0.15 + 0.1 * (level - 1)
endfunction

constant function Cursed_Soul_DamageRate takes nothing returns real
    // Returns the percentge of life stolen to a random unit
    return 5.0
endfunction

constant function Cursed_Soul_PossessDur takes integer level returns real
    // Returns the possession duration for the target unit
    return 20.0 + 10.0 * (level - 1)
endfunction

constant function Cursed_Soul_AOE takes nothing returns real
    // Returns the AOE where the spell will try to find any enemy.
    return 1000.0
endfunction

constant function Cursed_Soul_Radius takes nothing returns real
    // Returns the distace which the soul will have from the caster.
    return 300.0
endfunction

constant function Cursed_Soul_StartEffect takes nothing returns string
    // Returns the spirit effect for the spell.
    return "Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl"
endfunction

constant function Cursed_Soul_SpiritEffect takes nothing returns string
    // Returns the spirit effect for the spell.
    return "Abilities\\Spells\\Human\\Banish\\BanishTarget.mdl"
endfunction

constant function Cursed_Soul_SpiritEffectDead takes nothing returns string
    // Returns the spirit effect when the soul dies before reaching the target.
    return "Objects\\Spawnmodels\\Undead\\UndeadDissipate\\UndeadDissipate.mdl"
endfunction

constant function Cursed_Soul_SpiritEffectTarget takes nothing returns string
    // Returns the spirit effect when the soul dies before reaching the target.
    return "Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl"
endfunction

constant function Cursed_Soul_SpiritEffectDamRate takes nothing returns string
    // Returns the spirit effect when the soul dies before reaching the target.
    return "Abilities\\Spells\\Undead\\Sleep\\SleepSpecialArt.mdl"
endfunction

constant function Cursed_Soul_SpiritEffectPossession takes nothing returns string
    // Returns the spirit effect when the soul dies before reaching the target.
    return "Abilities\\Spells\\Undead\\Possession\\PossessionMissile.mdl"
endfunction

//******************************************************************************
//* The custom functions used in the trigger
//*
function Cursed_Soul_GetAngleBetweenUnits takes unit a, unit b returns real
    return Atan2(GetUnitY(b) - GetUnitY(a), GetUnitX(b) - GetUnitX(a))
endfunction

function Cursed_Soul_GetRandomEnemy takes unit c, group g, real range returns unit
    local unit u
    local boolean b1
    local boolean b2
    local boolean b3
    local boolean b4
    local boolean b5
    loop
        set u = FirstOfGroup(g)
        set b1 = GetWidgetLife( u ) > 0.405
        set b2 = IsUnitType(u, UNIT_TYPE_STRUCTURE) == false
        set b3 = IsUnitType(u, UNIT_TYPE_FLYING) == false
        set b4 = IsUnitEnemy(u, GetOwningPlayer(c))
        set b5 = IsUnitInRangeXY(u, GetUnitX(c), GetUnitY(c), range) 
        exitwhen u == null or (b1 and b2 and b3 and b4 and b5)
        call GroupRemoveUnit(g, u)
    endloop
    call DestroyGroup(g)
    return u
endfunction

function Cursed_Soul_ControlSoul takes nothing returns nothing
    local unit u = GetEnumUnit()
    local real t = 0.0
    local effect fx = AddSpecialEffectTarget(Cursed_Soul_SpiritEffect(), u, "origin")
    call UnitAddAbility(u, 'Amrf')
    call UnitRemoveAbility(u, 'Amrf')
    loop
        exitwhen GetWidgetLife(u) < 0.405 or u == null 
        call SetUnitVertexColor(u, 100, 100, 100, R2I(70.0 + 20.0 * Cos(t)))
        call SetUnitFlyHeight(u, 40.0 + 40 * Cos(t), 100.0)
        set t = t + 10.0
        call TriggerSleepAction(0.0)
    endloop
    call DestroyEffect(fx)
    set u = null
    set fx = null
endfunction

function Cursed_Soul_StartControlSoul takes nothing returns nothing
    call ExecuteFunc("Cursed_Soul_ControlSoul") 
endfunction

function Cursed_Soul_CatchEnemy takes unit soul, unit caster, unit target returns nothing
    local integer st = GetUnitTypeId(soul)
    local player pt = GetOwningPlayer(target)
    local player ps = GetOwningPlayer(soul)
    local timer t = CreateTimer()
    local real d = GetUnitState(soul, UNIT_STATE_MAX_LIFE) * Cursed_Soul_LifeStolen(GetUnitAbilityLevel(caster, Cursed_Soul_SpellID()))
    loop
        exitwhen IsUnitInRange(soul, target, 50.0) or GetWidgetLife(soul) < 0.405 or GetWidgetLife(target) < 0.405
        call IssuePointOrder(soul, "move", GetUnitX(target), GetUnitY(target))
        call TriggerSleepAction(0.0)
    endloop
    if GetWidgetLife(target) < 0.405 and GetWidgetLife(soul) >= 0.405 then
        call DestroyEffect(AddSpecialEffect(Cursed_Soul_SpiritEffectDead(), GetUnitX(soul), GetUnitY(soul)))
        call RemoveUnit(soul)
    else//if GetWidgetLife(target) >= 0.405 and GetWidgetLife(soul) >= 0.405 then
        call DestroyEffect(AddSpecialEffectTarget(Cursed_Soul_SpiritEffectTarget(), target, "origin"))
        if GetUnitTypeId(target) == st then
            call RemoveUnit(soul)
            call DestroyEffect(AddSpecialEffectTarget(Cursed_Soul_SpiritEffectPossession(), target, "origin"))
            call SetUnitOwner(target, ps, true)
            call TimerStart(t, Cursed_Soul_PossessDur(GetUnitAbilityLevel(caster, Cursed_Soul_SpellID())), false, null)
            loop
                exitwhen TimerGetRemaining(t) <= 0 or GetWidgetLife(target) < 0.405
                call DestroyEffect(AddSpecialEffectTarget(Cursed_Soul_SpiritEffectDamRate(), target, "origin"))
                call UnitDamageTarget(caster, target, Cursed_Soul_DamageRate(), true, false, ATTACK_TYPE_MAGIC, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
                call TriggerSleepAction(1.0)
            endloop
            call SetUnitOwner(target, pt, true)
        else
            call UnitDamageTarget(soul, target, d, true, false, ATTACK_TYPE_MAGIC, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
            call RemoveUnit(soul)
        endif   
    endif
    call DestroyTimer(t)
    set pt = null
    set ps = null
    set t = null
endfunction

function Cursed_Soul_WaitNearbyEnemy takes unit soul, unit caster returns nothing
    local real t = Cursed_Soul_GetAngleBetweenUnits(soul, caster)
    local location lc
    local group g
    local unit u
    local real x
    local real y
    loop
        set lc  = GetUnitLoc(caster)
        set g = GetUnitsInRangeOfLocAll(0.6 * Cursed_Soul_AOE(), lc)
        call RemoveLocation(lc)
        set u = Cursed_Soul_GetRandomEnemy(caster, g, 0.6 * Cursed_Soul_AOE())
        exitwhen u != null
        call DestroyGroup(g)
        set t = t + bj_PI / 15.0
        set x = GetUnitX(caster) + Cursed_Soul_Radius() * Cos(t)
        set y = GetUnitY(caster) + Cursed_Soul_Radius() * Sin(t)
        call IssuePointOrder(soul, "move", x, y)
        call TriggerSleepAction(0.0)
    endloop
    call Cursed_Soul_CatchEnemy(soul, caster, u)
    set lc = null
    set g = null
    set u = null
endfunction


//******************************************************************************
//* The main functions used in the trigger
//*
function Cursed_Soul_Conditions takes nothing returns boolean
    return GetSpellAbilityId() == Cursed_Soul_SpellID()
endfunction

function Cursed_Soul_Actions takes nothing returns nothing
    local unit c = GetSpellAbilityUnit()
    local unit t = GetSpellTargetUnit()
    local real x = GetUnitX(t)
    local real y = GetUnitY(t)
    local integer utt = GetUnitTypeId(t)
    local real ft = GetUnitFacing(t)
    local unit d = CreateUnit(GetOwningPlayer(c), utt, x, y, ft)
    local group g = CreateGroup()
    local location lc = GetUnitLoc(c)
    call DestroyEffect(AddSpecialEffect(Cursed_Soul_StartEffect(), x, y))
    call UnitAddAbility(d, 'Abun')
    call UnitAddAbility(d, 'Aloc')
    call GroupAddUnit(g, d)
    call ForGroup(g, function Cursed_Soul_StartControlSoul)
    call DestroyGroup(g)
    set g = GetUnitsInRangeOfLocAll(Cursed_Soul_AOE(), lc)
    call RemoveLocation(lc)
    set t = Cursed_Soul_GetRandomEnemy(c, g, Cursed_Soul_AOE())
    if t == null then
        call Cursed_Soul_WaitNearbyEnemy(d, c)
    else
        call Cursed_Soul_CatchEnemy(d, c, t)
    endif
    set c = null
    set t = null
    set d = null
endfunction

//===========================================================================
function InitTrig_Cursed_Soul takes nothing returns nothing
    local trigger t = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( t, Condition( function Cursed_Soul_Conditions ) )
    call TriggerAddAction( t, function Cursed_Soul_Actions )
    call Preload(Cursed_Soul_StartEffect())
    call Preload(Cursed_Soul_SpiritEffect())
    call Preload(Cursed_Soul_SpiritEffectDead())
    call Preload(Cursed_Soul_SpiritEffectTarget())
    call Preload(Cursed_Soul_SpiritEffectDamRate())
    call Preload(Cursed_Soul_SpiritEffectPossession())
    set t = null
endfunction



EDIT: Screenshot added.
Attached Files
File Type: w3x (1)Cursed Soul.w3x (53.6 KB, 344 views)

Last edited by moyack : 02-11-2007 at 05:17 PM.
moyack is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 02-10-2007, 05:59 PM   #2
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,901

Submissions (37)

Vexorian has a reputation beyond repute (1054)Vexorian has a reputation beyond repute (1054)Vexorian has a reputation beyond repute (1054)Vexorian has a reputation beyond repute (1054)Vexorian has a reputation beyond repute (1054)Vexorian has a reputation beyond repute (1054)

Hero Contest #3 - 2nd Place

Default

I don't understand the part in which you add a single unit to a unit group, then ForGroup that group to do something with ExecuteFunc, wouldn't it be easier to just process the unit directly without the unit group intervention?
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 02-10-2007, 10:30 PM   #3
moyack
Evil Emoticon
 
moyack's Avatar


Respected User
Project Leader: PoC
 
Join Date: Jan 2006
Posts: 3,263

Submissions (17)

moyack is a splendid one to behold (658)moyack is a splendid one to behold (658)moyack is a splendid one to behold (658)moyack is a splendid one to behold (658)

AI Tournament #2 - 2nd PlaceHero Contest - Second place

Send a message via MSN to moyack
Default

Well, I did that in order to use GetEnumUnit() command in the function started by ExecuteFunc and get the target corpse. With that I save the usage of handle vars, return bug exploiters, etc.
moyack is offline   Reply With Quote
Old 02-10-2007, 10:36 PM   #4
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,901

Submissions (37)

Vexorian has a reputation beyond repute (1054)Vexorian has a reputation beyond repute (1054)Vexorian has a reputation beyond repute (1054)Vexorian has a reputation beyond repute (1054)Vexorian has a reputation beyond repute (1054)Vexorian has a reputation beyond repute (1054)

Hero Contest #3 - 2nd Place

Default

but for that you could just use a global variable?
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 02-10-2007, 11:11 PM   #5
EidolonFlame
User
 
Join Date: Feb 2007
Posts: 6

EidolonFlame has little to show at this moment (0)

Default

is it just me or if you have more than one soul and when both souls intend to kill a target but one reaches first and kills it, the second disappears? or is it meant to be that way?
EDIT: oh and they cost food too!

Last edited by EidolonFlame : 02-10-2007 at 11:17 PM.
EidolonFlame is offline   Reply With Quote
Old 02-11-2007, 12:06 AM   #6
moyack
Evil Emoticon
 
moyack's Avatar


Respected User
Project Leader: PoC
 
Join Date: Jan 2006
Posts: 3,263

Submissions (17)

moyack is a splendid one to behold (658)moyack is a splendid one to behold (658)moyack is a splendid one to behold (658)moyack is a splendid one to behold (658)

AI Tournament #2 - 2nd PlaceHero Contest - Second place

Send a message via MSN to moyack
Default

Quote:
Originally Posted by EidolonFlame
is it just me or if you have more than one soul and when both souls intend to kill a target but one reaches first and kills it, the second disappears? or is it meant to be that way?

Yes, that's true. the souls have as a purpose to damage/control an enemy temporally. So, as an example, the caster has 3 souls, and the target enemy die with less souls, then the remaining souls won't have any purpose and they will die. I did in that way in order to give limitations to the spell.

About the food.... Hmm... I have to see if there's a way to fix it. Thanks for your comments.

Quote:
Originally Posted by Vexorian
but for that you could just use a global variable?
I did in that way in order to comply with the JESP. I remembered that Blu once told me that global variables in a spell goes against the JESP. I'm not sure.

Last edited by moyack : 02-11-2007 at 03:34 PM.
moyack is offline   Reply With Quote
Old 02-11-2007, 05:38 PM   #7
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,725

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

Nooo Moyack.

Global variables make things non-MUI in some cases, but temp globals for use in ForGroup() and ExecuteFunc() callbacks are perfectly okay.
Temp globals are the ones declared in the blizzard.j file.

That is more than likely what Blu told you.
It's just you probably misunderstood.
__________________
Home Page
DoE v1.14c Download
AotZ v2.03d Download
OD v0.10x Download

Coming soon eventually...

Personal To-Do List:
¤ ICARUS
¤ Aot3

WC3C Chat
Chat IP: 66.103.20.109
Earthbound 2 in English
vJass Manual

"DAMAGE_TYPE_POISON motherfucker!" ~Anitarf

Last edited by Rising_Dusk : 02-11-2007 at 05:39 PM.
Rising_Dusk is offline   Reply With Quote
Old 02-11-2007, 05:52 PM   #8
blu_da_noob
Nonchalant
 
blu_da_noob's Avatar


Respected User
 
Join Date: Mar 2006
Posts: 1,933

Submissions (2)

blu_da_noob is just really nice (398)blu_da_noob is just really nice (398)blu_da_noob is just really nice (398)blu_da_noob is just really nice (398)blu_da_noob is just really nice (398)blu_da_noob is just really nice (398)

[Quicksilver #2] - 2nd Place[Quicksilver#1] 1st place

Send a message via MSN to blu_da_noob
Default

Cursed_Soul_GetRandomEnemy has unnecessary usage of boolean variables.

As Vex mentioned, ForGroup for no reason. You could use a temp BJ global to pass the unit, which is acceptable for JESP.

Trigger sleep action loops?

(Edit: I loaded this thread ages ago and did other stuff before replying, so this is essentially a cross-post with Dusk)

Last edited by blu_da_noob : 02-11-2007 at 05:54 PM.
blu_da_noob is offline   Reply With Quote
Old 02-11-2007, 06:46 PM   #9
moyack
Evil Emoticon
 
moyack's Avatar


Respected User
Project Leader: PoC
 
Join Date: Jan 2006
Posts: 3,263

Submissions (17)

moyack is a splendid one to behold (658)moyack is a splendid one to behold (658)moyack is a splendid one to behold (658)moyack is a splendid one to behold (658)

AI Tournament #2 - 2nd PlaceHero Contest - Second place

Send a message via MSN to moyack
Default

Quote:
Originally Posted by Rising_Dusk
Nooo Moyack.

Global variables make things non-MUI in some cases, but temp globals for use in ForGroup() and ExecuteFunc() callbacks are perfectly okay.
Temp globals are the ones declared in the blizzard.j file.

That is more than likely what Blu told you.
It's just you probably misunderstood.
Definitely, a big misunderstanding. I'm glad to have it clarified.


Quote:
Originally Posted by blu_da_noob
Cursed_Soul_GetRandomEnemy has unnecessary usage of boolean variables.
Ok, you mean that:
Collapse JASS:
function Cursed_Soul_GetRandomEnemy takes unit c, group g, real range returns unit
    local unit u
    local boolean b1
    local boolean b2
    local boolean b3
    local boolean b4
    local boolean b5
    loop
        set u = FirstOfGroup(g)
        set b1 = GetWidgetLife( u ) > 0.405
        set b2 = IsUnitType(u, UNIT_TYPE_STRUCTURE) == false
        set b3 = IsUnitType(u, UNIT_TYPE_FLYING) == false
        set b4 = IsUnitEnemy(u, GetOwningPlayer(c))
        set b5 = IsUnitInRangeXY(u, GetUnitX(c), GetUnitY(c), range) 
        exitwhen u == null or (b1 and b2 and b3 and b4 and b5)
        call GroupRemoveUnit(g, u)
    endloop
    call DestroyGroup(g)
    return u
endfunction

I do in this way so the code can be more readable for me (I just hate to read a LOOONG line with booleans). Because booleans doesn't leak, I think there's no problem. Unless you know some issue in particular.

Quote:
Originally Posted by blu_da_noob
As Vex mentioned, ForGroup for no reason. You could use a temp BJ global to pass the unit, which is acceptable for JESP.
Actually, it had a purpose, as I answered to Vex. I just wanted to get the target unit without using any global variable. But now that I'm encouraged to use BJ globals, well, I'll do the modifications as soon as I finish some works.

Are there TriggerSleepActions unnecessarily?? I checked and I consider all of them are importants in the spell behavior.
moyack is offline   Reply With Quote
Old 02-25-2007, 05:35 AM   #10
Daelin
Kelani Mage
 
Daelin's Avatar
 
Join Date: Oct 2003
Posts: 737

Submissions (48)

Daelin is a glorious beacon of light (474)Daelin is a glorious beacon of light (474)Daelin is a glorious beacon of light (474)Daelin is a glorious beacon of light (474)

Hero Contest - First place

Default

I don't know what Blu was refering when he mentioned the TriggerSleepActions, but the function is faulty as if someone lags in a multiplayer game, it may cause desyncs. PolledWait() fixes this problem, though it leaks, so Vex made an improved version.

~Daelin
__________________
I am Grand Magister Daelin Silverwing not Grand Admiral Daelin Proudmoore!!!



Daelin is offline   Reply With Quote
Old 02-25-2007, 10:48 AM   #11
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,725

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

He was referring to TSA inside of loops.
They are innaccurate and do not function as desired.

The use of a TSA inside of a loop *should* always be replaced by a periodic timer.
Always.
__________________
Home Page
DoE v1.14c Download
AotZ v2.03d Download
OD v0.10x Download

Coming soon eventually...

Personal To-Do List:
¤ ICARUS
¤ Aot3

WC3C Chat
Chat IP: 66.103.20.109
Earthbound 2 in English
vJass Manual

"DAMAGE_TYPE_POISON motherfucker!" ~Anitarf
Rising_Dusk is offline   Reply With Quote
Old 02-27-2007, 05:09 AM   #12
Pyrogasm
Lackadaisically Absent.
 
Pyrogasm's Avatar


Respected User
 
Join Date: Sep 2006
Posts: 4,514

Submissions (9)

Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)

Hero Contest - Fourth place

Send a message via ICQ to Pyrogasm Send a message via AIM to Pyrogasm Send a message via MSN to Pyrogasm Send a message via Yahoo to Pyrogasm
Default

Quote:
Originally Posted by blu_d_noob
You could use a temp BJ global to pass the unit, which is acceptable for JESP.
Can someone explain what a "temp BJ global" is, and how it's declared in blizzard.j? Are they vJass things that I won't be able to use (Mac = not compatible), or something I should know about?

...or is that just another way to refer to "a variable declared in the variable editor"?

To comply with the JESP standard, what does one have to state (regarding globals) in the spell code?
__________________
Quote:
Originally posted by Rising_Dusk
Your spells are mostly ignored because they are not very cool so we aren't very excited to review/approve them, but you are incredibly persistent and won't give us an excuse to graveyard it. That is generally what results in a resource being ignored for a long time.

The Spell Request ThreadDone for, unless someone else wants to revive it...
It lasted a damn long time.

Please; Ask for Help Appropriately














Quote:
Originally posted by Kyrbi0
Huh. Almost makes me wish I had a girlfriend, to take advantage of today (wait, no, that's not what I meant... I mean, take advantage of the fact that it is international women's day... gah, never mind).
Quote:
Originally posted by Pyrogasm
Rome may not have been built in a day, but the Romans sure as hell didn't say "look at this great city we built guys!" when they had nothing more than a bit of stone and some cottages.

Last edited by Pyrogasm : 02-27-2007 at 05:09 AM.
Pyrogasm is offline   Reply With Quote
Old 02-27-2007, 11:21 AM   #13
moyack
Evil Emoticon
 
moyack's Avatar


Respected User
Project Leader: PoC
 
Join Date: Jan 2006
Posts: 3,263

Submissions (17)

moyack is a splendid one to behold (658)moyack is a splendid one to behold (658)moyack is a splendid one to behold (658)moyack is a splendid one to behold (658)

AI Tournament #2 - 2nd PlaceHero Contest - Second place

Send a message via MSN to moyack
Default

@Rising: I think the TSA usage in this spell is acceptable since I don't require precision in the loop, it's used just to give smoothness to the soul movement. (Check that I used call TriggerSleepAction(0.0))

@Pyrogasm: The Temp BJ globals are variables defined in the global section of the Blizzard.j file. They are used by the BJ functions to transfer data from one function to other.

Last edited by moyack : 02-27-2007 at 12:14 PM.
moyack is offline   Reply With Quote
Old 02-27-2007, 03:27 PM   #14
Daelin
Kelani Mage
 
Daelin's Avatar
 
Join Date: Oct 2003
Posts: 737

Submissions (48)

Daelin is a glorious beacon of light (474)Daelin is a glorious beacon of light (474)Daelin is a glorious beacon of light (474)Daelin is a glorious beacon of light (474)

Hero Contest - First place

Default

TriggerSleepAction(0.0) is aproximately equivalent with TriggerSleepAction(0.30). Usually this is the value, though sometimes it may be slightly lower 0.27. Therefore, TriggerSleepAction(0.0) will always make the movement look "choppy" or "lagged". Moreover, TriggerSleepAction can cause desyncs in multiplayer. You should definitely focus on timers, though ti depends as I saw the spell, you probably used this to make the units follow the caster, and so, super accuracy is not required. Therefore, I'd go with PolledWait.

~Daelin
__________________
I am Grand Magister Daelin Silverwing not Grand Admiral Daelin Proudmoore!!!



Daelin is offline   Reply With Quote
Old 02-27-2007, 05:10 PM   #15
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,725

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

TSA is also heavily delayed on Bnet based upon synchronization with the host.
This can cause a spell to be utterly unusable.

I remember an AotZ ability that had a 0.0 TSA loop that in SP was perfect, but in most MP games was delayed up to 2 seconds between iterations.
This spell should most definitely be in a timer callback for a good half of the stuff.

Also, your current loop has the potential to bust execution limit if the caster never dies or vanishes.
Not that this case is likely, but it's worth noting.
__________________
Home Page
DoE v1.14c Download
AotZ v2.03d Download
OD v0.10x Download

Coming soon eventually...

Personal To-Do List:
¤ ICARUS
¤ Aot3

WC3C Chat
Chat IP: 66.103.20.109
Earthbound 2 in English
vJass Manual

"DAMAGE_TYPE_POISON motherfucker!" ~Anitarf
Rising_Dusk is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 07:26 PM.


Donate

Affiliates
The Hubb http://bylur.com - Warcraft, StarCraft, Diablo and DotA Blog & Forums The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2013, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services