-
Contributor
Want to do something when using TownPortal, MapPortal or EndMapPylon
Hi,
I want to make action when my character using TownPortal, MapPortal or EndMapPylon (this pylon at the end of first or second map dungeon).
Like:
if ("myCharacter is using town portal" || "back pylon" || "using map portal") do something
else do something else
Is it possible?
-
Savvy ? 🐒
For the tp in town :
PHP Code:
if ((int)Hud.Game.Me.AnimationState == 13) // town tp
But I have no clue about your other questions.
(Maybe it's possible to do some check inside the INewAreaHandler?)
-
Post Thanks / Like - 2 Thanks
MrOne,
johnbl (2 members gave Thanks to JackCeparou for this useful post)
-
-
Savvy ? 🐒
Originally Posted by
MrOne
EDIT: No need to search more, this AnimationState == 13 case covers all situation (TP to town, TP using map and TP using pylon).
Oh, great, thanks for reporting, that's good to know ;p
-
Contributor
Originally Posted by
JackCeparou
Oh, great, thanks for reporting, that's good to know ;p
Funny is that i locate this:
Code:
public enum AcdAnimationState
{
Invalid = -1,
Idle = 1,
Running = 2,
Transform = 3,
TakingDamage = 6,
Casting = 7,
Attacking = 8,
Channeling = 10,
Dead = 11,
}
but there is no info about 13 how did you figure it out?
-
Contributor
Originally Posted by
MrOne
Funny is that i locate this:
Code:
public enum AcdAnimationState
{
Invalid = -1,
Idle = 1,
Running = 2,
Transform = 3,
TakingDamage = 6,
Casting = 7,
Attacking = 8,
Channeling = 10,
Dead = 11,
}
but there is no info about 13
how did you figure it out?
probably just printing out the current animState
-
lol, do you say there the is a value for 13? whats the meaning of it?
Do not send me private messages unless it is absolutely necessary or the content is sensitive or when I ask you to do that...
-
Member
13 is when using Town Portal (T), end of rift stone to teleport back and the teleport when using the map. Its when the teleport bar above the character appears
-
Contributor
Originally Posted by
KillerJohn
lol, do you say there the is a value for 13? whats the meaning of it?
Like Levithan say, now i use it in my plugin and it work every time KJ is it new for you?
-
Savvy ? 🐒
Originally Posted by
MrOne
Like Levithan say, now i use it in my plugin and it work every time
KJ is it new for you?
It was added in one of the lastest release ; )
PHP Code:
namespace Turbo.Plugins
{
public enum AcdAnimationState
{
Invalid = -1,
Idle = 1,
Running = 2,
Transform = 3,
TakingDamage = 6,
Casting = 7,
Attacking = 8,
Channeling = 10,
Dead = 11,
CastingPortal = 13,
}
}
Thanks KJ for adding it, one less cast to write
-
First Dev On The Internet
The info is from one of the latest changelogs...