Hi,
I am trying to differentiate real player users and NPC's in as3 /server side. But I am unable to do so. Because there is no default functions available in as3/server side...Is there any functions available??? If so please let us know..
In sfs2x isNPC() function is available. Is there any similar function available in 1.6.6???
Identifing NPC user in as3/server side
Re: Identifing NPC user in as3/server side
Hi.
Hmm... Maybe you can use the getIpAddress() method from the User object? It should probably return either 127.0.0.1 or null if it is a NPC.
Otherwise, when you create the NPC, you can set a simple boolean as a property like user.put("npc", true), which you can later use for identifying npcs.
Hmm... Maybe you can use the getIpAddress() method from the User object? It should probably return either 127.0.0.1 or null if it is a NPC.
Otherwise, when you create the NPC, you can set a simple boolean as a property like user.put("npc", true), which you can later use for identifying npcs.
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.