| 07-24-2009, 09:47 PM | #1 |
I was wondering if it is possible to use jass to change the size of an sfx. I need "Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl" to be larger. Here is my code: JASS:function Trig_Stomp_Conditions takes nothing returns boolean return GetSpellAbilityId() == 'A000' endfunction function Stomp_Filter takes nothing returns boolean return IsPlayerEnemy(GetOwningPlayer(GetTriggerUnit()), GetOwningPlayer(GetFilterUnit())) and GetWidgetLife(GetFilterUnit()) > 0.405 and not IsUnitType(GetFilterUnit(), UNIT_TYPE_FLYING) endfunction function Stomp_CopyGroup takes group g returns group set bj_groupAddGroupDest = CreateGroup() call ForGroup(g, function GroupAddGroupEnum) return bj_groupAddGroupDest endfunction function Stomp_Move takes nothing returns nothing local string s = I2S(H2I(GetExpiredTimer())) local gamecache gc = udg_AbilityCache local real x = GetStoredReal(gc, s, "x") local real y = GetStoredReal(gc, s, "y") local integer i = GetStoredInteger(gc, s, "level") local group g = Stomp_CopyGroup(I2G(GetStoredInteger(gc, s, "group"))) local real dur = GetStoredReal(gc, s, "dur")+0.05 local real ux local real uy local real a local unit f local real p = GetStoredReal(gc, s, "speed")-0.5/(1+0.5*i) local real fx = GetStoredReal(gc, s, "speed")-0.5/(1+0.5*i) if dur < 1+0.5*i then loop set f = FirstOfGroup(g) exitwhen f == null set ux = GetUnitX(f) set uy = GetUnitY(f) set a = Atan2(uy-y, ux-x) call SetUnitPosition(f, ux+40*Cos(a), uy+40*Sin(a)) if fx >= 1 then call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl", f, "origin")) endif call GroupRemoveUnit(g, f) endloop call StoreReal(gc, s, "dur", dur) call StoreReal(gc, s, "speed", p) else call DestroyGroup(I2G(GetStoredInteger(gc, s, "group"))) call FlushStoredMission(gc, s) call DestroyTimer(GetExpiredTimer()) endif set gc = null call DestroyGroup(g) set g = null set f = null endfunction function Trig_Stomp_Actions takes nothing returns nothing local unit c = GetTriggerUnit() local real x = GetUnitX(c) local real y = GetUnitY(c) local integer i = GetUnitAbilityLevel(c, 'A000') local boolexpr b = Condition(function Stomp_Filter) local group g = CreateGroup() local group n local unit f local gamecache gc = udg_AbilityCache local timer t = CreateTimer() local string s = I2S(H2I(t)) call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl", x, y)) call GroupEnumUnitsInRange(g, x, y, 750, b) set n = Stomp_CopyGroup(g) loop set f = FirstOfGroup(n) exitwhen f == null call UnitDamageTarget(c, f, 25*i, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, null) call GroupRemoveUnit(n, f) endloop call StoreInteger(gc, s, "level", i) call StoreInteger(gc, s, "group", H2I(g)) call StoreReal(gc, s, "x", x) call StoreReal(gc, s, "y", y) call StoreReal(gc, s, "speed", 50) call TimerStart(t, 0.05, true, function Stomp_Move) set c = null call DestroyBoolExpr(b) set b = null set g = null call DestroyGroup(n) set n = null set f = null set gc = null set t = null endfunction //=========================================================================== function InitTrig_Fire_Wave takes nothing returns nothing set gg_trg_Fire_Wave = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Fire_Wave, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Fire_Wave, Condition( function Trig_Stomp_Conditions ) ) call TriggerAddAction( gg_trg_Fire_Wave, function Trig_Stomp_Actions ) call Preload("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl") call Preload("Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl") endfunction |
| 07-24-2009, 09:50 PM | #2 |
Sadly it's not. You can however attach the effect to a unit with an invisible model and change the unit's size. |
| 07-24-2009, 10:14 PM | #3 |
Or you can make a dummy unit and change its model file, then resize it with code. It'll create a new object, sure, but it gives you alot more options (time scale, turn, colors etc). I'd also recommend xe for special effects. |
| 07-24-2009, 11:11 PM | #4 |
So far I got this for spawning the unit at the location of the caster: JASS:function Stomp_Dummy takes player id, integer unitid, real x, real y, real face returns unit local real castLocX local real castLocY set castLocX = ??? set castLocY = ??? GetUnitLoc (???) call CreateUnit (11, ???, castLocX, castLocY, ???) call DestroyUnit (???) return ??? endfunction |
| 07-24-2009, 11:28 PM | #5 |
USE XE. XEFX HAS GOT AN EXTRA FUNCTION TO CHANGE THE SIZE(BASED ON CHANGING THE SIZE OF THE INVIS UNIT THE EFFECT IS ATTACHED TO). No but's. |
| 07-25-2009, 12:14 AM | #6 |
I downloaded xe, and it worked fine. However, I have no idea where to start. I have no clue what a method, struct, or library is. I'm just looking for a larger effect. |
| 07-25-2009, 12:42 AM | #7 |
change model better. you can cut other animations, change color\size attach other texture change animation speed. This cannot be done by jass\triggers soo get some time for mdl format. |
