Difference between revisions of "SameSex"
From UODemo Wiki
(Created page with 'integer '''sameSex'''(object ''MobileA'', object ''MobileB'');<br> The ''sameSex'' function will return 1 if both mobiles have the same 'sex value', see getSex. Otherwise 0 …') |
|||
Line 3: | Line 3: | ||
The ''sameSex'' function will return 1 if both mobiles have the same 'sex value', see [[getSex]]. Otherwise 0 is returned. | The ''sameSex'' function will return 1 if both mobiles have the same 'sex value', see [[getSex]]. Otherwise 0 is returned. | ||
− | Because a 'sex value' of 0 is used for both male mobiles and invalid mobiles, you should use the [[isMobile]] function to validate the objects first to avoid unwanted results! | + | Because a 'sex value' of 0 is used for both male mobiles and invalid mobiles, you should use the [[isMobile]] function to validate the objects first to avoid unwanted results!<br> |
+ | Because ghosts have a body type of 402 or 403 you should not use this function to compare the sex of dead players. | ||
Return to the [[Command List]]. | Return to the [[Command List]]. |
Latest revision as of 20:53, 24 November 2012
integer sameSex(object MobileA, object MobileB);
The sameSex function will return 1 if both mobiles have the same 'sex value', see getSex. Otherwise 0 is returned.
Because a 'sex value' of 0 is used for both male mobiles and invalid mobiles, you should use the isMobile function to validate the objects first to avoid unwanted results!
Because ghosts have a body type of 402 or 403 you should not use this function to compare the sex of dead players.
Return to the Command List.