| 03-31-2006, 10:33 PM | #2 |
Looks like it should work, but maybe you have to defeat the other team as well. Or there's a third condition slow status that is pretty much the same thing. Maybe a computer player is stuffing it up? |
| 03-31-2006, 10:35 PM | #3 |
what the hell is fissure from dota, nto everyone plays dota and memorizes all the abilities, i dont even think thats an ability |
| 03-31-2006, 11:48 PM | #4 |
Unless I've mixed up names, I believe this is fissure, from DotA Allstars 6.29b: JASS:function kH takes nothing returns nothing local location J9=GetSpellTargetLoc() local location ki=GetUnitLoc(GetTriggerUnit()) local location gF local effect fx local destructable array kI local player FD=GetOwningPlayer(GetTriggerUnit()) local real kj=AngleBetweenPoints(ki,J9) local integer jb=20 local integer kJ=R2I(1200/jb) local integer FH=1 local integer Fi=jb loop exitwhen FH>Fi set gF=PolarProjectionBJ(ki,FH*kJ,kj) set kI[FH]=CreateDestructableLoc('B000',gF,GetRandomReal(0,360),.5,GetRandomInt(0,2)) set fx=AddSpecialEffectLoc("Abilities\\Spells\\Other\\Volcano\\VolcanoDeath.mdl",gF) call RemoveLocation(gF) call DestroyEffect(fx) set FH=FH+1 endloop call PolledWait(8.) set FH=1 loop exitwhen FH>Fi call RemoveDestructable(kI[FH]) set kI[FH] = null set FH=FH+1 endloop call RemoveLocation(J9) call RemoveLocation(ki) set J9 = null set ki = null set fx = null set gF = null endfunction I took the liberty of fixing a few minor memory leaks. The damage and stun must be dealt by an impale. I recommend replacing polledwait with a timer expiration and some game cache to have a precise duration. Post if you want that. |
| 03-31-2006, 11:58 PM | #5 |
reformatted PipeDream's script so its easier to understand, guessed the names for the variables kinda, came out good though. JASS:function Trig_Fissure_Actions takes nothing returns nothing local location t=GetSpellTargetLoc() local location ki=GetUnitLoc(GetTriggerUnit()) local location nextloc local effect fx local destructable array dest local player p=GetOwningPlayer(GetTriggerUnit()) local real angle=AngleBetweenPoints(nextloc,t) local integer times=20 local integer dist=R2I(1200/times) local integer x=1 local integer steps=times loop exitwhen x>steps set nextloc=PolarProjectionBJ(nextloc,x*dist,angle) set dest[x]=CreateDestructableLoc('B000',nextloc,GetRandomReal(0,360),0.5,GetRandomInt(0,2)) set fx=AddSpecialEffectLoc("Abilities\\Spells\\Other\\Volcano\\VolcanoDeath.mdl",nextloc) call RemoveLocation(nextloc) call DestroyEffect(fx) set x=x+1 endloop call PolledWait(8.0) set x=1 loop exitwhen x>steps call RemoveDestructable(dest[x]) set x=x+1 endloop call RemoveLocation(t) call RemoveLocation(nextloc) endfunction |
| 04-01-2006, 12:17 AM | #6 |
Your units are a little off. jb/Fi is the number of steps or destructables to make, not a duration. kJ is the distance between each destructable, not a speed |
| 04-01-2006, 12:32 AM | #7 |
okay fixed |
| 04-01-2006, 06:29 AM | #8 |
Thanks guys. I have a question though, I am kind of noob with JASS so I am not seeing where to put in the dummy impale ability rawcode. If its not in there, can you guys edit everything in that I would need? |
| 04-01-2006, 07:15 AM | #9 |
I believe the spell is a normal impale, with the model removed. The trigger's event is that spell being cast. So the damage and stun is part of the normal spell. |
| 04-01-2006, 07:25 AM | #10 |
I understand that, but how exactly do I implement this spell into the map? I don't know how to write it in JASS so that it goes off then that ability is cast. I also don't see how to do this in GUI since the code is in JASS. Can someone post everything I need to copy and paste or tell me how to put this into map? |
| 04-01-2006, 10:30 AM | #11 |
JASS:function Trig_Fissure_Conditions takes nothing returns boolean return GetSpellAbilityId() == 'A000' //change this rawcode to that of your impale ability endfunction function Trig_Fissure_Actions takes nothing returns nothing local location t=GetSpellTargetLoc() local location ki=GetUnitLoc(GetTriggerUnit()) local location nextloc local effect fx local destructable array dest local player p=GetOwningPlayer(GetTriggerUnit()) local real angle=AngleBetweenPoints(nextloc,t) local integer times=20 local integer dist=R2I(1200/times) local integer x=1 local integer steps=times loop exitwhen x>steps set nextloc=PolarProjectionBJ(nextloc,x*dist,angle) set dest[x]=CreateDestructableLoc('B000',nextloc,GetRandomReal(0,360),0.5,GetRandomInt(0,2)) //change the raw code in the line above to that of the destructable you want to create set fx=AddSpecialEffectLoc("Abilities\\Spells\\Other\\Volcano\\VolcanoDeath.mdl",nextloc) call RemoveLocation(nextloc) call DestroyEffect(fx) set x=x+1 endloop call PolledWait(8.0) set x=1 loop exitwhen x>steps call RemoveDestructable(dest[x]) set x=x+1 endloop call RemoveLocation(t) call RemoveLocation(nextloc) endfunction function InitTrig_Fissure takes nothing returns nothing set gg_trg_Fissure = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Fissure, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Fissure, Condition( function Trig_Fissure_Conditions ) ) call TriggerAddAction( gg_trg_Fissure, function Trig_Fissure_Actions ) endfunction Create a trigger named 'Fissure', convert it to custom text and copy and paste that in. Change the rawcodes where the comments are and it should work. |
| 04-01-2006, 06:20 PM | #12 |
Thanks for the code. I have a few problems with the spell though. I changed the rawcodes and double checked them, and nothing happens when the spell is cast. Also, what rawcode is the one used by DotA's fissure? |
| 04-01-2006, 06:36 PM | #13 |
I don't have the DotA map on hand, so I can't tell you what the rawcode they use is. As for the spell in your map, I suggest you try debug messages. JASS:call BJDebugMsg("1") Insert that line into the trigger in various places (including the condition) and change the number between the quotation marks each time. When you cast the spell it should display some of them and not others, telling you where the spell is failing. You could also try commenting out the following line: JASS:call TriggerAddCondition( gg_trg_Fissure, Condition( function Trig_Fissure_Conditions ) ) |
| 04-01-2006, 09:11 PM | #14 |
I replaced: Code:
local location nextloc Code:
local location nextloc = ki However, when I cast it, it creates the special effects and the fissures in random places. Essentially, lets say I cast it in front of me, it sometimes create part of the fissure in front of me, and the rest somewhere else leading toward center of map. Its really weird lol. |
| 04-01-2006, 09:42 PM | #15 |
Eh, I missed that one :P This one should work correctly: JASS:function Trig_Fissure_Conditions takes nothing returns boolean return GetSpellAbilityId() == 'A000' //change this rawcode to that of your impale ability endfunction function Trig_Fissure_Actions takes nothing returns nothing local location t=GetSpellTargetLoc() local location ki=GetUnitLoc(GetTriggerUnit()) local location nextloc local effect fx local destructable array dest local player p=GetOwningPlayer(GetTriggerUnit()) local real angle=AngleBetweenPoints(nextloc,t) local integer times=20 local integer dist=R2I(1200/times) local integer x=1 local integer steps=times loop exitwhen x>steps set nextloc=PolarProjectionBJ(ki,x*dist,angle) set dest[x]=CreateDestructableLoc('B000',nextloc,GetRandomReal(0,360),0.5,GetRandomInt(0,2)) //change the raw code in the line above to that of the destructable you want to create set fx=AddSpecialEffectLoc("Abilities\\Spells\\Other\\Volcano\\VolcanoDeath.mdl",nextloc) call RemoveLocation(ki) set ki = nextloc call DestroyEffect(fx) set x=x+1 endloop call RemoveLocation(ki) call PolledWait(8.0) set x=1 loop exitwhen x>steps call RemoveDestructable(dest[x]) set x=x+1 endloop call RemoveLocation(t) call RemoveLocation(nextloc) endfunction function InitTrig_Fissure takes nothing returns nothing set gg_trg_Fissure = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Fissure, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Fissure, Condition( function Trig_Fissure_Conditions ) ) call TriggerAddAction( gg_trg_Fissure, function Trig_Fissure_Actions ) endfunction |
