Author Topic: Avatar Events v.1.2  (Read 6620 times)

I was reading through swol and your code and you guys are over complicating a lot of the functions haha.

this may sound a bit naive, but doesn't this already exist

There's also my version, though it's not in add-on release state. It was more geared towards developers working with the avatar appearance through code (if you've tried working with the avatars through code, you know its TERRIBLE). All though it does have all of the Events Goth's does, minus 1 or 2:

https://github.com/Elmling/Avatar_API

I was reading through swol and your code and you guys are over complicating a lot of the functions haha.

There's also my version, though it's not in add-on release state. It was more geared towards developers working with the avatar appearance through code (if you've tried working with the avatars through code, you know its TERRIBLE). All though it does have all of the Events Goth's does, minus 1 or 2:
Swollow's add-on doesn't work for me for some reason, I even tried using it with a fresh Blockland install and still couldn't get it to work ): I made this as a request for my brother Deokotaru, who also was having trouble with those events.

I was not aware that you were working on something like this, if you would like to collaborate on optimizing the code (could be cleaner and use cases for some stuff) that would be awesome! :D

I do not think it is necessary to have all those different event outputs tho
Code: [Select]
registerOutputEvent("Player", "EditAppearance", "list setNodeColor 0 hideNode 1 unhideNode 2 setDecal 3 setFace 4" TAB "string 70 70" TAB "paintcolor 0" TAB "string 30 30", true);
vs your code example:
Code: [Select]
registerOutputEvent(GameConnection,setBodyType,"list Male 0 Female 1");
registerOutputEvent(GameConnection,setPantsColor,"paintColor paintColor");
registerOutputEvent(GameConnection,setPantsType,"list Male 0 Female 1");
registerOutputEvent(GameConnection,setRightArmColor,"paintColor paintColor");
registerOutputEvent(GameConnection,setLeftArmColor,"paintColor paintColor");
registerOutputEvent(GameConnection,setLeftHandColor,"paintColor paintColor");
registerOutputEvent(GameConnection,setLeftHandType,"list Hook 0 Hand 1");
registerOutputEvent(GameConnection,setRightHandColor,"paintColor paintColor");
registerOutputEvent(GameConnection,setRightHandType,"list Hook 0 Hand 1");
registerOutputEvent(GameConnection,setRightShoeColor,"paintColor paintColor");
registerOutputEvent(GameConnection,setLeftShoeColor,"paintColor paintColor");
registerOutputEvent(GameConnection,setRightSkiColor,"paintColor paintColor");
registerOutputEvent(GameConnection,setLeftSkiColor,"paintColor paintColor");
registerOutputEvent(GameConnection,setRightPegColor,"paintColor paintColor");
registerOutputEvent(GameConnection,setLeftPegColor,"paintColor paintColor");
registerOutputEvent(GameConnection,setLeftShoeType,"list Shoe 0 Ski 1 Peg 2");
registerOutputEvent(GameConnection,setRightShoeType,"list Shoe 0 Ski 1 Peg 2");
registerOutputEvent(GameConnection,setPackType,"list Armor 0 Bucket 1 Cape 2 Pack 3 Quiver 4 Tank 5 None 6");
registerOutputEvent(GameConnection,setPackColor,"paintColor paintColor");
That would add much to the event list

Since you reminded me actually, I forgot to mention that you do not have to be node specific when modifying nodes. For example:
onActivate > Player > EditAppearance > hideNode "hands" will hide both hands.

Here is a list of string substitutions you can use for editing nodes and groups of nodes faster:
Quote
"accent" - the cap accent
"cap"   - the player hat
"head" - same as headSkin
"arms" - both arms
"hands" both hands
"legs" both peg legs
"feet" both shoes
"foot" same as shoe

I don't know if it's possible but can you add an event where you can open the player customization GUI to change the avatar? It would be easier.

I don't know if it's possible but can you add an event where you can open the player customization GUI to change the avatar? It would be easier.
You can already do this :)

Just change your avatar in the avatar GUI, then make a brick-button that saves your avatar.
This only works outside the minigame and for mini-games without full uniforms

-snip-

I'm not working on it anymore, it was something I worked on a year ago. I didn't know about the alternate node names, that's cool.

I can fix and add a few things to 'Avatar API' and then you can add it into your add-on and even edit the code as you feel since you'll be actively working on 'Avatar Events' (presumably..).