PDA

View Full Version : Pandamonium's Flick Script



ElementUser
02-18-2010, 07:03 PM
READ: This is only for reference, as the in-depth mechanical applications of Flick are actually somewhat complex compared to other spells.

I hate this spell's code so much, so it deserves its own thread. I'm going to post what my interpretation the spell process/algorithm would be (some of it may be wrong as I'm unsure of what some of the code lines actually do).

Pandamonium's Flick consists of 8 different files: ability.entity, state_selfbind.entity, projectile_selfbind.entity, state_anim.entity, gadget.entity, projectile.entity, state_bind.entity, state_slow.entity.

For reference's sake I'll post the code here & highlight the important lines.

ability.entity


<ability
name="Ability_Panda2"

icon="icon.tga"

anim="ability_2_leap"
casttime="650"
castactiontime="350"
casteffect=""

statuseffecttooltip="State_Panda_Ability2_Slow"

maxlevel="4"
requiredlevel="1,3,5,7"

actiontype="target_entity"
targetscheme="nonboss_organic_enemy_units"
casteffecttype="Physical"

manacost="85"
cooldowntime="24000,22000,20000,18000"
range="350"
>
<onimpact >
<spawnprojectile name="Projectile_Panda_Ability2_Selfbind" source="source_entity" proxy="target_entity" target="target_entity" bind="source_entity" bindstate="State_Panda_Ability2_Selfbind" noresponse="true" />
</onimpact>

<onframe>
</onframe>state_selfbind.entity:


<state
name="State_Panda_Ability2_Selfbind"



icon="icon.tga"


stunned="true"
effecttype=""
ishidden="true"
>
</state>projectile_selfbind.entity:


<projectile
name="Projectile_Panda_Ability2_Selfbind"

speed="1500"
gravity="2500"

modelscale="1.0"
model=""


canturn="false"
flying="false"
flyheight="0"
impactdistance="100"
>
<onimpact>
<applystate name="State_Panda_Ability2_Animation" target="source_entity" proxy="proxy_entity" duration="500" />
<playanim name="ability_2" target="source_entity" />
</onimpact>

</projectile>state_anim.entity:


<state
name="State_Panda_Ability2_Animation"



icon="icon.tga"
ishidden="true"
effecttype=""
disarmed="true"
immobilized="true"
silenced="true"
perplexed="true"
impactinterval="400"
>
<onimpact>
<condition test="distance lt 500" source="proxy_entity" target="source_entity">
<spawnunit name="Gadget_Panda_Ability2" target="source_entity" pushentity="true" offset="0 -150" />
<spawnprojectile name="Projectile_Panda_Ability2" source="proxy_entity" target="stack_entity" bind="proxy_entity" bindstate="State_Panda_Ability2_Bind" proxy="proxy_entity" noresponse="true" />
</condition>
</onimpact>
</state>gadget.entity:


<gadget
name="Gadget_Panda_Ability2"



icon=""
portrait=""
model=""

preglobalscale="1.0"
modelscale="1.0"
effectscale="1.0"
boundsheight="0"
boundsradius="0"
isselectable="false"
selectionradius="0"
targetoffset="0 0 0"

canrotate="false"
ismobile="false"

attacktype="none"
combattype="Ranged"

sightrangeday="0"
sightrangenight="0"
unitwalking="true"
canattack="false"
deathtime="0"
corpsetime="0"

invulnerable="true"
flying="false"
drawonmap="false"

>

</gadget>projectile.entity:


<projectile
name="Projectile_Panda_Ability2"

gravity="4500"
lifetime="1000"
useexactlifetime="true"

modelscale="1.0"
model=""
deatheffect=""
canturn="false"
flying="false"
flyheight="0"
>
<onimpact>
<applystate name="State_Panda_Ability2_Slow" target="proxy_entity" duration="6000" />
<kill target="target_entity" source="" />
</onimpact>
</projectile>state_bind.entity:


<state
name="State_Panda_Ability2_Bind"



icon="icon.tga"

silenced="true"
perplexed="true"
immobilized="true"
disarmed="true"
stunned="true"

passiveeffect="effects/launch.effect"
nothreat="1"
effecttype=""
>
</state>state_slow.entity:


<state
name="State_Panda_Ability2_Slow"



icon="icon.tga"

movespeedslowstart="0.2,0.3,0.4,0.5"
movespeedslowmid="0.2,0.3,0.4,0.5"
movespeedslowend="0.0"
movespeedslowduration="6000"
movespeedslowmidpos="0.33"
armor="-2,-4,-6,-8"

passiveeffect="effects/passive.effect"

effecttype="StatusDebuff"
>
<onframe />
</state>Description of Flick's Algorithm

1) Upon reaching the cast point (0.35s), projectile_selfbind is spawned. The source is declared on Panda's dynamic position (following him wherever he goes), the target is declared on the targeted unit of Flick. The proxy of the projectile is also the target.

Bind just links Pandamonium to a state, which is state_selfbind. The duration of this state is linked (or "binded") to the projectile's lifetime.

2a) Projectile_selfbind now moves Pandamonium at a speed of 1500 units/s to the target. After reaching the point where Pandamonium is 100 units away from the target, state_anim is applied to Panda. The projectile expires at this point.

b) During this time, Pandamonium is inflicted with state_selfbind, which inflicts a stun on Panda until projectile_selfbind expires.

3) Upon spawning state_anim, there is a delay of 0.4s upon impacting. Once state_anim impacts, it checks to see if the target is within 500 range of Panda. If this condition is true, then:

a) gadget_ is spawned 150 units behind Panda (the gadget functions as a position marker).

b) Projectile_ is then spawned on the proxy & binds state_bind to the proxy for the duration of the projectile's lifetime. (Recall the proxy is the same as the target at this point in time). State_bind basically disables the target during the flight time.

5) Projectile_ lives for 1 second and travels to gadget_. After the projectile dies, it applies state_slow to the proxy and then kills the proxy (note that the original target doesn't actually die though, only the proxy is destroyed)

balsafresh
02-19-2010, 01:49 PM
:/ I feel stupid.

ElementUser
02-19-2010, 01:51 PM
:/ I feel stupid.

So did I when I couldn't understand it :(

elevator13
02-22-2010, 12:01 AM
Is the reason Panda can "leap" after Valkyrie because disjoint only clears the target_entity and not proxy_entity?

ElementUser
02-22-2010, 12:50 PM
Is the reason Panda can "leap" after Valkyrie because disjoint only clears the target_entity and not proxy_entity?

About the reasoning on why Pandamonium can actually get his projectile on Valkyrie even though she has a disjoint though - I would say yes. Predator's affector & ability.entity functions in a similar way (except there's no distance check) and it bypasses the disjoint as well

The only thing that matters when assessing when Panda's Flick actually works on Valkyrie though only depends on where Valkyrie is at the moment state_anim does the distance check of 500 range. Try it yourself in Practice mode and you'll see this is true. If Valkyrie leaped past 500 range when the trigger check happens, then Panda won't leap after her & flick her from a large distance.

skanzz
04-17-2010, 05:06 AM
Has this been changed now? Or at what point can valk no longer leap away? I have played panda against valk a few times recently (sorry no match IDs yet) and seem to have noticed flicks failing that seemed like they weren't going to fail. (really unhelpful post as i cant remember the exact details, but it really annoyed me at the time :p)

ElementUser
04-17-2010, 09:22 AM
Has this been changed now? Or at what point can valk no longer leap away? I have played panda against valk a few times recently (sorry no match IDs yet) and seem to have noticed flicks failing that seemed like they weren't going to fail. (really unhelpful post as i cant remember the exact details, but it really annoyed me at the time :p)

Nothing about Panda's Flick & Valk's Leap has been changed.

Read my previous post and that's the reason.

Catiot
09-11-2010, 07:01 AM
In my opinion the flick must be reworked or limited somehow.

DeBaron
09-28-2010, 04:55 AM
As I have no clue what most of the coding is about what is it that makes flick cancel or still go off when your target is moved (tabet/leap). I and many other players assume it's a timing issue is this the case?

ElementUser
09-28-2010, 06:30 AM
Once state_anim impacts, it checks to see if the target is within 500 range of Panda. If this condition is true, then:

If it's false then Flick will not take place