| 01-29-2006, 12:04 AM | #1 |
Wonderful. The addition of CS_Error really makes things a lot easier. |
| 01-29-2006, 11:54 AM | #2 |
I found a weird bug... well its not a bug more of a annoyance. When you cast Goblin grenade on blank AoE like grass(no trees or enemies) two rotating demolisher appear and remain there permanently. I detected no lag, just annoying demolishers, other spells seem fine. This doesn't happen in version 12.9. |
| 01-29-2006, 11:56 AM | #3 |
gj... like allways for the SimError is now a part of the CS, how about adding a function like this? (i think it originaly belongs to you Vex, a GUI version of it came out with CopyCat TomeBlocker) function ErrorToUnit takes unit u,string msg returns nothing if IsUnitSelected(u,GetOwningPlayer(u)) then call CS_Error(GetOwningPlayer(u),msg) endif call DisableTrigger(GetTriggeringTrigger()) call PauseUnit(u,true) call IssueImmediateOrder(u,"stop") call PauseUnit(u,false) call EnableTrigger(GetTriggeringTrigger()) endfunction question: may (not) having the SP2 installed and using the CS cause a "serversplit" in LAN ? |
| 01-29-2006, 12:39 PM | #4 |
Having SP2 and using everything can cause serversplits if other people don't have SP2. |
| 01-29-2006, 06:52 PM | #5 |
with the CS and collisionmissiles no. But for general wc3 and certain situations it is a possibility since it does work differently |
| 01-29-2006, 08:28 PM | #6 |
Vex do you know any reason why Goblin Grenades act as I previously mentioned? I have SP2 I checked. |
| 01-30-2006, 12:24 AM | #7 |
hmnn I didn't see your post before I will check it out. And the reason has nothing to do with SP2. Edit: I made a few tests and it seems to be an optimizer's bug. Try saving the caster system map somewhere else and test the map it should not happen. I will try to fix the bug with the optimizer |
| 01-30-2006, 05:38 PM | #8 |
I got two spells that I have some problems with. Pan Pan Slam: JASS://*************************************************************************** //* //* Pan Pan Slam //* //* Requires: //* -The Pan Pan Slam Ability //* -The Caster System //* -The Earth Crush Warstomp abilitiy //* -This Trigger (make sure the Configuration Section is pointing to //* the right abilities/buffs) //* //* Art: //* - The Ability's Caster Art determines the missile effect //* - And the impact effect is determinied by the warstomp ability. //* //*************************************************************************** //=========================================================================== // Pan Pan Slam Spell Configuration: // constant function Earth_Crush_SpellId takes nothing returns integer return 'A01M' //Earth Crush 's Ability Rawcode endfunction constant function Earth_Crush_Warstomp takes nothing returns integer return 'A01L' //// Earth Crush Warstomp Ability Rawcode endfunction //=========================================================================== function Trig_Earth_Crush_Conditions takes nothing returns boolean return GetSpellAbilityId() == Earth_Crush_SpellId() endfunction function Trig_Earth_Crush_Actions takes nothing returns nothing local unit caster=GetTriggerUnit() local location target=GetSpellTargetLoc() local integer l=GetUnitAbilityLevel(caster,GetSpellAbilityId()) local location loc=GetUnitLoc(caster) local boolean sel set sel=IsUnitSelected( caster, GetOwningPlayer(caster) ) call ShowUnit(caster, false) call ProjectileLaunchExLoc( GetOwningPlayer(caster), SpellEffectModelPath( GetSpellAbilityId(), EFFECT_TYPE_CASTER ) , 1.75, 255,255,255,255, 522, 0.25, loc, 50, target, 0 ) call CasterCastAbilityLevelPointLoc( GetOwningPlayer(caster), Earth_Crush_Warstomp(),l,"stomp", target, true ) call ShowUnit(caster, true) call SetUnitAnimation(caster, "birth") if sel then call SelectUnitAddForPlayer( caster, GetOwningPlayer(caster) ) endif call RemoveLocation(loc) call RemoveLocation(target) set loc=null set target=null endfunction //=========================================================================== function InitTrig_Pan_Pan_Slam takes nothing returns nothing call PreloadAbility( Earth_Crush_Warstomp() ) set gg_trg_Pan_Pan_Slam = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Pan_Pan_Slam, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Pan_Pan_Slam, Condition( function Trig_Earth_Crush_Conditions ) ) call TriggerAddAction( gg_trg_Pan_Pan_Slam, function Trig_Earth_Crush_Actions ) endfunction JASS://*************************************************************************************************** //* //* Multi Shot //* ¯¯¯¯¯¯¯¯¯¯ //* Requires: //* - The Caster System ( [url]http://vexorian.wc3campaigns.com[/url] ) //* - The Multi Shot Ability (Based on slow unless you change the orderids) //* - This Trigger (Make sure the Configuration section has your map's rawcodes) //* //* Note: To Change the art, use the Object editor an edit these fields of the ability: //* - Missile Art = The missile used by the ability. //* //*************************************************************************************************** //=================================================================================================== // Multi Shot Spell Configuration: // constant function MultiShot_SpellId takes nothing returns integer return 'A01Y' //// The spell id for the multi shot ability (its rawcode after copying to your map) endfunction constant function MultiShot_Speed takes nothing returns real return 900.0 // The missile speed endfunction constant function MultiShot_Radius takes integer l returns integer return 750+l*50 //// The radius of the afftected units Arc endfunction constant function MultiShot_Angle takes integer l returns integer return 150 //// The angle of the arc for the affected units endfunction constant function MultiShot_Damage takes integer l returns integer return 13+8*l //// Damage per level formula endfunction constant function MultiShot_MaximumTargets takes integer l returns integer return 1+1*l //// The Maximum number of Targets endfunction function MultiShot_DamageOptions takes integer l returns integer return DamageTypes(ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL) + DamageOnlyEnemies() // // Does Spell Normal damage // Only hits enemies // endfunction // //Next functions allow you to change the base spell of the multishot ability // (Currently it is using slow) (Is there any targeteable spell that is not arrows and // works on magic immune? // constant function MultiShot_OrderId_ON takes nothing returns integer return OrderId("slowon") endfunction constant function MultiShot_OrderId_OFF takes nothing returns integer return OrderId("slowoff") endfunction constant function MultiShot_OrderId_Target takes nothing returns integer return OrderId("slow") endfunction //============================================================================================================= function MultiShot_AngleCheck takes real angle, real angle1, real angle2 returns boolean local real x if angle1>angle2 then set x=angle1 set angle1=angle2 set angle2=x endif if angle2-angle1>angle1 - (angle2-360) then set angle2=angle2-360 if angle > 180 then set angle=angle-360 endif return angle>=angle2 and angle<=angle1 endif return angle>=angle1 and angle<=angle2 endfunction function MultiShot_Actions takes nothing returns nothing local unit u =GetTriggerUnit() local unit t=GetSpellTargetUnit() local integer s=GetSpellAbilityId() local integer l=GetUnitAbilityLevel(u, s ) local group affected=CreateGroup() local unit picked local real x=GetUnitX(u) local real y=GetUnitY(u) local real grad=MultiShot_Angle(l) local real alpha=ModuloReal( GetUnitFacing(u) - grad/2,360) local real beta= ModuloReal( GetUnitFacing(u) + grad/2,360) local real fc local string fx=GetAbilityEffectById(s,EFFECT_TYPE_MISSILE,0) local integer n=MultiShot_MaximumTargets(l) set bj_groupEnumOwningPlayer=GetOwningPlayer(u) call GroupEnumUnitsInRange( affected, x,y, MultiShot_Radius(l),null) loop set picked=FirstOfGroup(affected) exitwhen (picked==null) or (n==0) set grad=ModuloReal( Atan2BJ( GetUnitY(picked)-y, GetUnitX(picked)-x ) , 360 ) if MultiShot_AngleCheck(grad,alpha,beta) then set fc=GetDamageFactorByOptions(u,picked,MultiShot_DamageOptions(l)) if (fc!=0) then call DamagingProjectileLaunchTarget(u,fx,MultiShot_Speed(),0.15,x,y,60,picked,60,MultiShot_Damage(l)*fc,null,null) set n=n-1 endif endif call GroupRemoveUnit( affected, picked) endloop call IssueTargetOrderById(u, GetAttachedInt(u,"MultiShot_lastorder"),t) call DestroyGroup(affected) set affected=null set u=null set picked=null set t=null endfunction function MultiShot_Attacked takes nothing returns nothing local unit u=GetAttacker() local unit t=GetTriggerUnit() local integer i=GetUnitCurrentOrder(u) if (GetIssuedOrderId() == MultiShot_OrderId_ON()) then call AttachBoolean(t, GetAttachedString(t,"#CurrentFakeAutoCast#") , false) call AttachBoolean(t,"MultiShot_On",true) call AttachString(t,"#CurrentFakeAutoCast#","MultiShot_On") elseif (GetIssuedOrderId() == MultiShot_OrderId_OFF()) then call AttachBoolean(t,"MultiShot_On",false) elseif (GetTriggerEventId() == EVENT_PLAYER_UNIT_ATTACKED) and GetAttachedBoolean(u,"MultiShot_On") and (GetUnitCurrentOrder(u)!=OrderId("flamingarrowstarg")) then call AttachInt(u,"MultiShot_lastorder",i) if IssueTargetOrderById(u, MultiShot_OrderId_Target(), t) then call SetUnitAnimation(u, "attack") endif endif set u=null set t=null endfunction function MultiShot_Attacked_Conditions takes nothing returns boolean return (GetUnitAbilityLevel( GetAttacker(), MultiShot_SpellId() ) > 0 ) or (GetUnitAbilityLevel( GetTriggerUnit(), MultiShot_SpellId() ) > 0 ) endfunction function MultiShot_Conditions takes nothing returns boolean return (GetSpellAbilityId() == MultiShot_SpellId()) endfunction //=========================================================================== function InitTrig_MultiShot takes nothing returns nothing set gg_trg_MultiShot=CreateTrigger() call TriggerRegisterAnyUnitEventBJ( gg_trg_MultiShot, EVENT_PLAYER_UNIT_ATTACKED ) call TriggerRegisterAnyUnitEventBJ( gg_trg_MultiShot, EVENT_PLAYER_UNIT_ISSUED_ORDER ) call TriggerAddAction( gg_trg_MultiShot, function MultiShot_Attacked ) call TriggerAddCondition( gg_trg_MultiShot, Condition(function MultiShot_Attacked_Conditions) ) set gg_trg_MultiShot=CreateTrigger() call TriggerAddAction( gg_trg_MultiShot, function MultiShot_Actions ) call TriggerAddCondition( gg_trg_MultiShot, Condition(function MultiShot_Conditions) ) call TriggerRegisterAnyUnitEventBJ( gg_trg_MultiShot, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call Preload(GetAbilityEffectById(MultiShot_SpellId(),EFFECT_TYPE_MISSILE,0)) endfunction Now Pan Pan Slam I haven't tested optimized with Wc3 Map Optimizer. But when not optimized I can't see missiles on both spells. The effect is still there thus. They worked before. (Used Caster System 8.6). Now when optimized Multishot trigger acts like its not there. |
| 01-31-2006, 07:29 PM | #9 |
Code:
Vex do you know any reason why Goblin Grenades act as I previously mentioned? I have SP2 I checked. I just wanted to have a look at your CS 13.0 and I found the same bug. The initial "mistake" is this: step=speed*cycle to work correctly: step²<=400 this means highspeed would make the system busy and the projectile stays there forever, jumping one step back and forward and again.... Could be easily fixed by increasing this value to maybe 490 or 550.(Did work with 500) or just decrease the cycle to >0.04 Hope I could help |
| 01-31-2006, 10:07 PM | #10 |
nah, decreasing the cycle would be kind of lame and increase lag. The reason was the optimizer, in fact that gamecache was not case sensitive, the optimizer was changing "speed" to "Cd" and "accel" to "CD" , it ended having a huge speed value. The other reason is that it doesn't survive high speed correctly but the way to fix it is a little different. At very high speed projectiles seem lame anyways. But I got to fix it and will upload new version soon |
