-
Notifications
You must be signed in to change notification settings - Fork 760
Changelook
Haru edited this page Oct 19, 2016
·
1 revision
- changelook <look></look>,<look></look>;
Identical to 'setlook', but only client side (doesn't save).
The following code is a good example of the use of changelook. It uses bindatcmd to assign @afk some code to use, then detects the players upper headgear, changes it to show the AFK hat and allows the player to use the command again to put their original hat back.
OnAFK: if (@AFK) { [[set]] @AFK, 0; '''changelook''' 4,headupper; // Changes "head top" to use the players previous headgear sprite [[dispbottom]] "Away From Keyboard mode disabled."; end; } else { set @AFK, 1; headupper=[[getlook]](4); // getlook(4) fetches the "head top" id and assigns it to headupper for later use '''changelook''' 4,471; // Changes "head top" to use the sprite with view id 471 (AFK Hat) [[dispbottom]] "Away From Keyboard mode enabled."; end; } }
As changelook is only a client-side visual change, it doesn't send any changes to be saved towards the char server. It keeps your current headgear as it is, but just changes the view id.