Spell Fusion Orbs

GoGo-Boy

You can change this now in User CP
Reaction score
40
GoGo-Boy aka Na_Dann_Ma_GoGo presents: Fusion Orbs


JASS / GUI: JASS.
vJASS: Yes.
MUI: Yes.
Laggless: Yes.
Leakless: Think so.

Requires: NewGen Editor, HSAS Credits to PandaMine
The really nice testmap was made by Tinki3 and then a little bit edited by me to suit this certain spell testing.
I use the special dummy model which is made by Vexorian. This is to avoid the unnecessary use of multiple dummy units.

Purpose of it? Having a spell with a very, very cool movement which is totally configurable! Don't believe me? Test it!


Tooltip:
The hero launches one fire and one ice orb that fly towards the targeted location. The orbs rotate around each other until they have reached a certain distance from which on they'll start to slow down and gain fly height to afterwards smash down with full power and explode on impact. The enemy units take damage duo to the heat and are frozen because of the cold provided by the ice. If the distance between the caster and the targeted location isn't sufficent, the orbs will explode with minor effects.
Range - 1500
Level 1 - 130 damage and 3 sec freeze
Level 2 - 190 damage and 4.5 sec freeze
Level 3 - 250 damage and 6 sec freeze

Screenshots:
Fly Around (doesn't show it's real coolness ;) ):
fusionorbsflypb4.jpg
Explosion (that screenshot was kinda good I would say :O) :
fusionorbsexplosiondc8.jpg

Wanna see the code.. don't you?:

JASS:
// Fusion Orbs by GoGo-Boy aka Na_Dann_Ma_GoGo ------- Credits to tinki3 for testmap, PandaMine for his HSAS and Anitarf for some help considering the orbs rotation

// this is necessary for the use of HSAS 
library HSASintroduction
//! runtextmacro HSAS_Static("Fusion","32760","")
endlibrary

scope Fusionorbs initializer InitTrig

globals

//======================== RAW DATAS =========================================\\  
    private constant integer DUMMY_ID = 'u001' // the Raw Id of the dummy unit (must have the dummy.mdl model file!!!![look at import manager])
    private constant integer SPELL_ID = 'A000' // the Raw Id of the dummy spell
    private constant integer ROOT_ID = 'A002' // the Raw Id of the entangle spell (to "freeze" the units)
    
//========================= MODEL / EFFECT PATHS =================================================\\      
    private constant string ICE_PATH = "Abilities\\Spells\\Other\\FrostBolt\\FrostBoltMissile.mdl" // model path for the icy orb model
    private constant string FIRE_PATH = "Abilities\\Weapons\\LordofFlameMissile\\LordofFlameMissile.mdl" // model path of the fireorb model
    private constant string ICE_EXPLODE = "Abilities\\Weapons\\FrostWyrmMissile\\FrostWyrmMissile.mdl" // explosion effect
    private constant string FIRE_EXPLODE = "Abilities\\Weapons\\PhoenixMissile\\Phoenix_Missile_mini.mdl" // ""  ""
    private constant string FIRE_EXPLODE2 = "Abilities\\Spells\\Other\\Incinerate\\FireLordDeathExplode.mdl"  // ""  ""
  
//=========================== SIZE OF BOTH ORBS + EXPLOSION SIZE + FLY HEIGHT OF BOTH ORBS =========================================================\\  
    private constant real CYCLES_PER_SEC = 1 // the time in seconds a orbs need to fullify a rotation
    private constant real FIRE_ORB_SIZE = 1.2 // size of the fire orb
    private constant real ICE_ORB_SIZE = 1.5 // size of the ice orb
    private constant real EXPLODE_SIZE = 3.5 // size for the explosion effects
    private constant real FLY_HEIGHT = 70 // fly height of both orbs
 
//============================== Damage Configurations ===========================   
    private constant attacktype ATTACK_TYPE = ATTACK_TYPE_CHAOS
    private constant damagetype DAMAGE_TYPE = DAMAGE_TYPE_MAGIC
    private constant weapontype WEAPON_TYPE = WEAPON_TYPE_WHOKNOWS

//============================== DIFFERENT SPEED VALUES ==========================================\\      
    
    private constant real SLIDE_PERIOD = 0.03 // timer movement period [do not choose values below 0.025 (because it'll make no difference but is more intensive) or over 0.04 (won't be smooth enough anymore)
    private constant real DISTANCE = 60 // distance between both orbs (here 80... the " /2 " has other purposes :
    private constant real VELOCITY = 700 // amount of distance moved each second! 
//================================== DAMAGE AND FREEZE AOE ON IMPACT =======================================\\      
    
    private constant real EXPLODE_AOE = 300  // AOE in which enemy units get frozen and damaged
    private constant real BASE_FIRE_DAMAGE = 130  // base damage
    private constant real LEVEL_FIRE_DAMAGE = 60 // damage per level [total of 190 at level 2 for example]
      
//===================================DISTANCES OF THE FINAL MOVEMENT===================\\    
    
    private constant real SLOW_DOWN_DIST = 150 // amount of distance during which the orbs slow down [setting it to zero or less looks so cool <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite2" alt=";)" title="Wink    ;)" loading="lazy" data-shortname=";)" /> ]
    private constant real SPEED_UP_DIST = 250  // amount of distance during which the orbs speed up
                 // warning --- the sum of SLOW_DOWN_DIST and SPEED_UP_DIST must be unequal to zero!!
    private constant real MAX_RISE_UP_HEIGHT = 200 // amount of height difference the orbs reach during the slow down phase
    private constant real MAX_SIDE_DISTANCE = 150 // amount of distance the orbs slide to the sides on slow down phase
    private constant real MODEL_ADJUSTMENT = 35 // this is to get both models on the correct position... in that case the fire orb would be a bit behind without that adjustment
     
//============================== GLOBAL PLAYER VARIABLE FOR FILTERING ===========================   
    private player PLAYER 
//=================================== MOSTLY PHYSICAL MOVEMENT CALCULATIONS - DO NOT TOUCH! ElSE YOU MIGHT DIE ==================\\  
    
    private constant real PI_HALF = 1.5708
    private constant real PI_DOUBLE = 2 * bj_PI
    
    private constant real FINAL_DISTANCE = SLOW_DOWN_DIST + SPEED_UP_DIST 
    private constant real FINAL_TIME = FINAL_DISTANCE / VELOCITY
    private constant real SLOW_DOWN_TIME = FINAL_TIME * 1.5 / 3
    private constant real SPEED_UP_TIME = FINAL_TIME * 1.5 / 3   
    
    private constant real NEG_ACCELERATION = (SLOW_DOWN_DIST - VELOCITY * SLOW_DOWN_TIME) / (SLOW_DOWN_TIME * SLOW_DOWN_TIME)
    private constant real SPEED_UP_SPEED = (NEG_ACCELERATION * 2 * SLOW_DOWN_TIME + VELOCITY) 
    private constant real POS_ACCELERATION = (SPEED_UP_DIST - SPEED_UP_SPEED  * SPEED_UP_TIME) / (SPEED_UP_TIME * SPEED_UP_TIME)   

    private constant real RISE_UP_ACCELERATION = MAX_RISE_UP_HEIGHT / ( SLOW_DOWN_TIME * SLOW_DOWN_TIME)
    private constant real FALL_DOWN_ACCELERATION = -((MAX_RISE_UP_HEIGHT + FLY_HEIGHT - 10) / (SPEED_UP_TIME * SPEED_UP_TIME))  
    
    private constant real SIDE_ACCELERATION = MAX_SIDE_DISTANCE / ( SLOW_DOWN_TIME * SLOW_DOWN_TIME)
    private constant real NEG_SIDE_ACCELERATION = -((MAX_SIDE_DISTANCE + DISTANCE) / (SPEED_UP_TIME * SPEED_UP_TIME))
    
endglobals



// filterfunction to filter out the units that will take damage and get frozen
// add an extra    &quot;if ..... then &quot; and for sure an &quot;endif&quot; afterwards...
private function FilterVictims takes nothing returns boolean
    local unit u = GetFilterUnit()
        if IsUnitType(u,UNIT_TYPE_STRUCTURE) != true then
            if IsUnitType(u,UNIT_TYPE_MAGIC_IMMUNE) != true then
                if GetWidgetLife(u) &gt; 0 then
                    if IsUnitEnemy(u,PLAYER) then
                        set u = null
                        return true
                    endif
                endif
            endif
        endif
    set u = null
        return false
endfunction
    
private struct Fusion
    real level
    unit caster
    real caster_x
    real caster_y
   
    unit ice  
    real ice_x
    real ice_y
    
    unit fire
    real fire_x    
    real fire_y
    
    real ice_height
    real fire_height
    player owner
    effect fire_model 
    effect ice_model
    real facing
    real time =SLIDE_PERIOD
    real max_time = 0
    real rotation_adjustment
    real speed_up_time = SLIDE_PERIOD
    real slow_down_time = SLIDE_PERIOD
    boolean enough_range = false
    boolean checked = false
    boolean fall = false
    
    static method create takes nothing returns Fusion
    
        local Fusion f = Fusion.allocate()        
        local location loc = GetSpellTargetLoc()
        local real loc_x
        local real loc_y 
        local real move
        local unit caster = GetTriggerUnit()
        local real cast_x = GetUnitX(caster)
        local real cast_y = GetUnitY(caster)
        set f.caster = caster
        set loc_x = GetLocationX(loc) - cast_x
        set loc_y = GetLocationY(loc) - cast_y
        set f.owner = GetTriggerPlayer()
        set f.level = I2R(GetUnitAbilityLevel(f.caster,SPELL_ID))
        set f.facing = Atan2(loc_y,loc_x)
        set f.caster_x = cast_x + 40 * Cos(f.facing)
        set f.caster_y = cast_y + 40 * Sin(f.facing)
        set f.max_time = SquareRoot(loc_y * loc_y + loc_x * loc_x) / VELOCITY
        
        if f.max_time &gt; FINAL_TIME then
            set f.enough_range = true
            set f.rotation_adjustment = (1-((f.max_time - FINAL_TIME) - R2I(f.max_time - FINAL_TIME))) * PI_DOUBLE
            set f.max_time = f.max_time - FINAL_TIME
        endif
        
        set f.ice = CreateUnit(f.owner,DUMMY_ID,f.caster_x,f.caster_y, bj_RADTODEG * f.facing)
        set f.ice_model = AddSpecialEffectTarget(ICE_PATH,f.ice,&quot;origin&quot;)            
        call SetUnitScale(f.ice,ICE_ORB_SIZE,ICE_ORB_SIZE,ICE_ORB_SIZE)
        
        set f.fire = CreateUnit(f.owner,DUMMY_ID,f.caster_x,f.caster_y, bj_RADTODEG * f.facing)
        set f.fire_model = AddSpecialEffectTarget(FIRE_PATH,f.fire,&quot;origin&quot;)
        call SetUnitScale(f.fire,FIRE_ORB_SIZE,FIRE_ORB_SIZE,FIRE_ORB_SIZE) 
    
        call RemoveLocation(loc)
        set caster = null
        set loc = null
        return f
    endmethod
    
    method onDestroy takes nothing returns nothing
        local real x = GetUnitX(.ice)
        local real y = GetUnitY(.ice)
        local unit u = CreateUnit(.owner,DUMMY_ID,x,y,0)
        local unit u2 = CreateUnit(.owner,DUMMY_ID,x,y,0)
        local unit victim
        local unit dummy
        local real damage
        local integer rootlevel
        local group g = CreateGroup()
      
        call SetUnitScale(u,EXPLODE_SIZE,EXPLODE_SIZE,EXPLODE_SIZE)
        call SetUnitScale(u2,EXPLODE_SIZE / 2,EXPLODE_SIZE / 2,EXPLODE_SIZE / 2)
        call KillUnit(.fire)
        call KillUnit(.ice)
        call KillUnit(u)
        call KillUnit(u2)
        call DestroyEffect(AddSpecialEffectTarget(ICE_EXPLODE,u2,&quot;origin&quot;))
        call DestroyEffect(AddSpecialEffectTarget(FIRE_EXPLODE,u,&quot;origin&quot;))
        call DestroyEffect(.fire_model)
        call DestroyEffect(.ice_model)
        
        if .enough_range == true then
            call DestroyEffect(AddSpecialEffectTarget(FIRE_EXPLODE2,u2,&quot;origin&quot;))
            call DestroyEffect(AddSpecialEffectTarget(ICE_EXPLODE,u,&quot;origin&quot;))
            set damage = BASE_FIRE_DAMAGE + LEVEL_FIRE_DAMAGE * (.level - 1)
            set rootlevel = R2I(.level)
        else
            call DestroyEffect(AddSpecialEffectTarget(ICE_EXPLODE,u2,&quot;origin&quot;))
            set damage = (BASE_FIRE_DAMAGE + LEVEL_FIRE_DAMAGE * (.level -1 )) / 2
            set rootlevel = 1
        endif
        
        set PLAYER = .owner
        call GroupEnumUnitsInRange(g,x,y,EXPLODE_AOE,Filter(function FilterVictims))        
        loop
            set victim = FirstOfGroup(g)
            exitwhen victim == null
            call GroupRemoveUnit(g,victim)
            set dummy = CreateUnit(.owner,DUMMY_ID,x,y,0)
            call UnitApplyTimedLife(dummy,&#039;BTLF&#039;,1)
            call UnitAddAbility(dummy,ROOT_ID)
            call SetUnitAbilityLevel(dummy,ROOT_ID,rootlevel)
            call IssueTargetOrder(dummy,&quot;entanglingroots&quot;,victim)
            call UnitDamageTarget(.caster,victim,damage,false,false,ATTACK_TYPE,DAMAGE_TYPE,WEAPON_TYPE)
        endloop
        call DestroyGroup(g)
        
        set g = null
        set dummy = null
        set u = null
        set u2 = null
        
        set .caster = null
        set .fire = null
        set .ice = null
        set .fire_model = null
        set .ice_model = null
        set .owner = null
    endmethod
    
endstruct    

private function Callback takes nothing returns nothing
local timer t = GetExpiredTimer()
local Fusion f = GetAttachedStructFusion(t)
local real dx
local real dy
local real dz

if f.time &lt;= f.max_time then
    // for the following I thank Anitarf for his help
    set dz = DISTANCE  * Sin(PI_DOUBLE * f.time * CYCLES_PER_SEC + f.rotation_adjustment)
    set dy = DISTANCE  * Cos(PI_DOUBLE * f.time * CYCLES_PER_SEC + f.rotation_adjustment) 

    set dx = dy * Cos(f.facing + PI_HALF) 
    set dy = dy * Sin(f.facing + PI_HALF)

    call SetUnitFlyHeight(f.ice,FLY_HEIGHT + DISTANCE + dz,0)
    call SetUnitX(f.ice, f.caster_x + VELOCITY * f.time * Cos(f.facing) + dx)
    call SetUnitY(f.ice, f.caster_y + VELOCITY * f.time * Sin(f.facing) + dy)
            
    call SetUnitFlyHeight(f.fire, FLY_HEIGHT + DISTANCE - dz,0)
    call SetUnitX(f.fire, f.caster_x + MODEL_ADJUSTMENT * Cos(f.facing) + VELOCITY * f.time * Cos(f.facing) - dx)
    call SetUnitY(f.fire, f.caster_y + MODEL_ADJUSTMENT * Sin(f.facing) + VELOCITY * f.time * Sin(f.facing) - dy)
    
    set f.time = f.time + SLIDE_PERIOD
    set t = null
    
elseif f.slow_down_time &lt;= FINAL_TIME and f.enough_range == true then
    
    if f.checked == false then
        set f.ice_x = GetUnitX(f.ice)
        set f.ice_y = GetUnitY(f.ice)
        set f.fire_x = GetUnitX(f.fire)
        set f.fire_y = GetUnitY(f.fire)
        set f.ice_height = GetUnitFlyHeight(f.ice)
        set f.fire_height = GetUnitFlyHeight(f.fire)
        set f.checked = true
    endif
    
    if f.slow_down_time &lt;= SLOW_DOWN_TIME then
        
        call SetUnitX(f.ice,f.ice_x + ((VELOCITY * f.slow_down_time + NEG_ACCELERATION * (f.slow_down_time * f.slow_down_time)) * Cos(f.facing)) + SIDE_ACCELERATION * (f.slow_down_time*f.slow_down_time) * Cos(f.facing + PI_HALF))
        call SetUnitY(f.ice,f.ice_y + ((VELOCITY * f.slow_down_time + NEG_ACCELERATION * (f.slow_down_time * f.slow_down_time)) * Sin(f.facing)) + SIDE_ACCELERATION * (f.slow_down_time*f.slow_down_time) * Sin(f.facing + PI_HALF))
        call SetUnitX(f.fire,f.fire_x + ((VELOCITY * f.slow_down_time + NEG_ACCELERATION * (f.slow_down_time * f.slow_down_time)) * Cos(f.facing)) + SIDE_ACCELERATION * (f.slow_down_time*f.slow_down_time) * Cos(f.facing - PI_HALF))
        call SetUnitY(f.fire,f.fire_y + ((VELOCITY * f.slow_down_time + NEG_ACCELERATION * (f.slow_down_time * f.slow_down_time)) * Sin(f.facing)) + SIDE_ACCELERATION * (f.slow_down_time*f.slow_down_time) * Sin(f.facing - PI_HALF))
        call SetUnitFlyHeight(f.ice,f.ice_height + RISE_UP_ACCELERATION * (f.slow_down_time * f.slow_down_time),0)
        call SetUnitFlyHeight(f.fire,f.fire_height + RISE_UP_ACCELERATION * (f.slow_down_time * f.slow_down_time),0)
        
        set f.slow_down_time = f.slow_down_time + SLIDE_PERIOD        
    
    elseif f.speed_up_time &lt;= SPEED_UP_TIME then
        
        if f.fall == false then
            set f.ice_x = GetUnitX(f.ice)
            set f.ice_y = GetUnitY(f.ice)
            set f.fire_x = GetUnitX(f.fire)
            set f.fire_y = GetUnitY(f.fire)
            set f.ice_height =  GetUnitFlyHeight(f.ice)
            set f.fire_height = GetUnitFlyHeight(f.fire)
            set f.fall = true
        endif
        
        call SetUnitX(f.ice,f.ice_x + ((SPEED_UP_SPEED * f.speed_up_time + POS_ACCELERATION * (f.speed_up_time * f.speed_up_time)) * Cos(f.facing)) + NEG_SIDE_ACCELERATION * (f.speed_up_time*f.speed_up_time) * Cos(f.facing + PI_HALF))
        call SetUnitY(f.ice,f.ice_y + ((SPEED_UP_SPEED * f.speed_up_time + POS_ACCELERATION * (f.speed_up_time * f.speed_up_time)) * Sin(f.facing)) + NEG_SIDE_ACCELERATION * (f.speed_up_time*f.speed_up_time) * Sin(f.facing + PI_HALF))
        call SetUnitX(f.fire,f.fire_x + ((SPEED_UP_SPEED * f.speed_up_time + POS_ACCELERATION * (f.speed_up_time * f.speed_up_time)) * Cos(f.facing)) + NEG_SIDE_ACCELERATION * (f.speed_up_time*f.speed_up_time) * Cos(f.facing - PI_HALF))
        call SetUnitY(f.fire,f.fire_y + ((SPEED_UP_SPEED * f.speed_up_time + POS_ACCELERATION * (f.speed_up_time * f.speed_up_time)) * Sin(f.facing)) + NEG_SIDE_ACCELERATION * (f.speed_up_time*f.speed_up_time) * Sin(f.facing - PI_HALF))
        call SetUnitFlyHeight(f.ice, f.ice_height + FALL_DOWN_ACCELERATION * (f.speed_up_time * f.speed_up_time),0) 
        call SetUnitFlyHeight(f.fire,f.fire_height + FALL_DOWN_ACCELERATION * (f.speed_up_time * f.speed_up_time),0)
        
        set f.speed_up_time = f.speed_up_time + SLIDE_PERIOD
        set t = null
    else
        call PauseTimer(t)
        call DestroyTimer(t)
        call f.destroy()
        set t = null
        
    endif    
else
    call PauseTimer(t)
    call DestroyTimer(t)
    call f.destroy()
    set t = null
endif
        
endfunction
        
private function Conditions takes nothing returns boolean
    return GetSpellAbilityId() == SPELL_ID
endfunction       

    
private function Actions takes nothing returns nothing
    local Fusion f = Fusion.create()
    local timer t = CreateTimer()
    
    call AttachStructFusion(t,f)
    call TimerStart(t,SLIDE_PERIOD,true,function Callback)
    
    set t = null
endfunction

private function InitTrig takes nothing returns nothing
    local trigger trig = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ(trig,EVENT_PLAYER_UNIT_SPELL_EFFECT)
    call TriggerAddCondition(trig,Condition(function Conditions))
    call TriggerAddAction(trig,function Actions)
endfunction

endscope

Notes:
I updated the spell code but not the map itself yet. Will re-upload it after some other changes.

The reason I use a second dummy ability (entangle) to freeze the units is that it greatly reduces the amount of code AND provides a buff (hence making it disspellable) + making it really MUI in such a way, that the new freeze duration will override the old... as it is with entangle.
You better don't base the main dummy ability (something with a target location) of something, that can be cast anywhere, and hence outside the map because I did not add a function that checks whether everything is in playable map area. But I based my dummy ability on shockwave which can't target areas outside the map AND I've read on campaigns.net, that the next patch fixes the crashes through "SetUnitX()/Y()".
Implantation instructions can be read above the trigger in the map.

Changelog:

Code:
Mai 12 - Release
           Aug 13 - Update

Give Credits to either GoGo-Boy or Na_Dann_Ma_GoGo if you use this spell in your map.

Have fun with testing and please give feedback!
 

Attachments

  • Fusion Orbs.w3x
    62.7 KB · Views: 321

GoGo-Boy

You can change this now in User CP
Reaction score
40
I dislike this ultra long lines provided by ands... and I will probably never change my stile for longer filters.
 

UndeadDragon

Super Moderator
Reaction score
447
From the screenshots it looks very good, a good piece of eye-candy :D
 

Larcenist

REP: Respect, Envy, Prosperity?
Reaction score
211
Can't really say anything but I love it. The movement looks extremly good, keep up the good work.
 

UndeadDragon

Super Moderator
Reaction score
447
Just tested it (took your advice) and I agree. The movement is brilliant. GJ :)
 

GoGo-Boy

You can change this now in User CP
Reaction score
40
Thanks : )
I'll probably add some other spells based on this one. Different orbs and different on impact effects.
 

PurgeandFire

zxcvmkgdfg
Reaction score
509
Awesome spell and great coding. But I have one question, how come you can't spam cast? :p

The spell prevents it from casting until the first spell is finished. :( (Unless you type -spam and do it with more than one unit)
 

GoGo-Boy

You can change this now in User CP
Reaction score
40
I based the dummy spell on shockwave. When you don't move after casting you can't cast again... that's hardcoded. However when you move shortly after casting you can immediately recast it. I didn't really know what to base it off >_<... and was to lazy when I recognized that^^.

By the way, does someone knows a perfect dummy ability for ranged stuff? Something without any AOE stun, summon, effect etc.? I've tried severals... but all got different disadvantages.
 

Kenny

Back for now.
Reaction score
202
This is a very cool spell. The concept is very good.

I have a few issues though...

The movement forumulas seem overly complicated, but after reading through the code, its seems neessary to have them so thats not major. Its just that the movement could have been simpler if it didnt involve the explosions and animations near the end.

The movement is nice, but it doesnt seem very fluent. Its hard to explain, but it is kind of like the problem i had with my similar spell. The orbs, instead of spiralling cleanly, seem to move forward, then cross over quickly... Told you its hard to explain :p

Also how bout using Channel for the spell.

Other than that, this spell is very, very cool :) good work!
 

GoGo-Boy

You can change this now in User CP
Reaction score
40
The formulas are simple those for distance with a certain start velocity.
d = Vo * t + 0.5a*t^2
I got 3 of them. One for height, one for side, and one for the forward movement.

You're absolutely right that this spell could be BY FAR more simple with only the rotation movement.. but I actually made this spell for these acceleration stuff and it took me ages to realize what I thought of :D

About the influent movement... I dunno. It should rotate with the same speed at all positions if I'm not mistaken. But gonna have a second look at it.

Thanks for feedback :)

Edit: Actually the orbs must rotate correctly because they fly forward with always the same speed while (independent of this forward movement) rotating with as well always the same speed either right or left and gaining or losing the exact height. But I'll watch it closely at replay function now^^.

Edit2: I recognized what I should improve here. At the moment I got no real circular rotation movement but rather a "rhomb" (if that's the correct English word^^). I might try to find the correct formula for that one today or in future >_<

Edit3: In case I find such a circular formula I should be able to greatly reduce the scrip size.
 

Kenny

Back for now.
Reaction score
202
A few suggestions...

Make your damage group (group g in your onDestroy method) a global and use GroupClear() instead of destroy group... I read that using DestroyGroup() is bad, maybe from vex but don't quote me on it.

You forgot to pause your timer before you destroy it.

Maybe add attachment points to globals... makes it easier for everyone.

Also you do not remove or kill your dummy unit that casts entangling roots.
 

GoGo-Boy

You can change this now in User CP
Reaction score
40
Okay fixed the timer and added expiration timer to the dummy entangle casters.


I do not use a global group for the onDestroy method. It is really unnecessary to have a global for 1 single group action. If it was in the callback function I would do that...I even used a global but removed it.
And I don't think there's something really bad about destroying groups. It's rather not as good as using one global that you never need to destroy. But I assume the main thought on this is, that you can use the same global in your MAP. But creating an extra group variable, even if it is only a single group action in the whole spell, is nonsense I would say.

Ahh and I don't add attachment points to the globals since the ones on the dummy unit wouldn't make any real sense to be changed and having the entangle-like effect somewhere else than origin will most likely never look good : P.

I do not want to add masses of unnecessary globals just to make everything configurable. If it was my own map, I could have a proper use of globals but not here.

Thanks for help. I'll +Rep if I can.
Edit: can't : D
 

GoGo-Boy

You can change this now in User CP
Reaction score
40
Oh that came unexpected fast oO
Thanks, although as I wrote in the "Notes" I didn't update the map yet, because I'm probably going to change a whole bunch soon. If it takes too long I'll do it soon though.
 

GoGo-Boy

You can change this now in User CP
Reaction score
40
Update!

The movement is now really a circular motion and hence looks by far better. Aside of that I made code improvements and got rid off about 70 lines of code.
 

Sim

Forum Administrator
Staff member
Reaction score
534
Thanks!

Naturally, if the author wishes for this spell to be approved again it will need an update!
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • 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
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top