Difference between revisions of "Dev:SDK/Core - Buttons"

From Slavemaker Wiki
Jump to: navigation, search
(Created page with "SlaveMaker 3 SDK Core Buttons There are a group of standard buttons in the Core game you can show Generally use provided functions, avoid directly accessing the movie clips...")
 
m (+SDKNav)
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
 +
{{Dev-SDKNav|Dev:SDK/Core - Backgrounds|Dev:SDK/Core - Combat}}
 +
 +
 
SlaveMaker 3 SDK
 
SlaveMaker 3 SDK
 
Core Buttons
 
Core Buttons
 
  
 
There are a group of standard buttons in the Core game you can show
 
There are a group of standard buttons in the Core game you can show
Line 7: Line 9:
 
Generally use provided functions, avoid directly accessing the movie clips
 
Generally use provided functions, avoid directly accessing the movie clips
  
________________________________________________________________
+
==Button MovieClips==
  
 +
;NextGeneral
 +
:next button in day and night events - please use ShowPlanningNext() and
 +
HidePlanningNext() to show/hide
 +
;NextEvent
 +
:next button for other events - please use DoEvent
 +
;Quitter
 +
:Leave button, use ShowLeaveButton() and HideLeaveButton()
 +
;PlanningButton
 +
:planning button on main screen
 +
;MorningButton
 +
:morning button
 +
;EveningButton
 +
:morning button
 +
;SystemButton
 +
:load/save
 +
;YesEvent, NoEvent
 +
:Yes/No buttons, normally use DoYesNoEvent/DoYesNoEventXY to show
 +
;AskQuestions
 +
:the list of questions shown, use AskHerQuestions/AddQuestion functions
  
Button MovieClips
+
==Functions==
NextGeneral - next button in day and night events - please use ShowPlanningNext() and HidePlanningNext() to show/hide
+
NextEvent - next button for other events - please use DoEvent
+
Quitter - Leave button, use ShowLeaveButton() and HideLeaveButton()
+
PlanningButton - planning button on main screen
+
MorningButton - morning button
+
EveningButton - morning button
+
SystemButton - load/save
+
YesEvent, NoEvent - Yes/No buttons, normally use DoYesNoEvent/DoYesNoEventXY to show
+
AskQuestions - the list of questions shown, use AskHerQuestions/AddQuestion functions
+
+
  
________________________________________________________________
+
;DoEvent
 
+
:do an event and show the NextEvent button.
 
+
:Other buttons are hidden
Functions
+
:''function DoEvent(enum:Object)''
 
+
:enum - event to do. This value can either be a Number or a String, If it is a Number it will set _root.NumEvent to this value. If it is a String it will set _root.StrEvent to this value
DoEvent
+
:When the button is clicked the game will call internally DoEventNext() and then first call the slavegirls DoEventNext() function
do an event and show the NextEvent button.
+
:eg
Other buttons are hidden
+
:<syntaxhighlight lang="actionscript" enclose="div">
function DoEvent(enum:Object)
+
enum - event to do. This value can either be a Number or a String,  
+
If it is a Number it will set _root.NumEvent to this value. If it is a String it will set _root.StrEvent to this value
+
When the button is clicked the game will call internally DoEventNext() and then first call the slavegirls DoEventNext() function
+
eg
+
 
_root.DoEvent(400);
 
_root.DoEvent(400);
eg
+
</syntaxhighlight>
 +
:eg
 +
:<syntaxhighlight lang="actionscript" enclose="div">
 
_root.NumEvent = 100 + type;
 
_root.NumEvent = 100 + type;
 
_root.DoEvent();
 
_root.DoEvent();
eg
+
</syntaxhighlight>
 +
:eg
 +
:<syntaxhighlight lang="actionscript" enclose="div">
 
_root.DoEvent("Snakes" + _root.slrandom(2));
 
_root.DoEvent("Snakes" + _root.slrandom(2));
eg
+
</syntaxhighlight>
 +
:eg
 +
:<syntaxhighlight lang="actionscript" enclose="div">
 
_root.DoEvent("LamiaEscape");
 
_root.DoEvent("LamiaEscape");
 +
</syntaxhighlight>
  
 +
===Yes/No===
  
Yes/No
+
;DoYesNoEvent
 +
:display yes/no buttons at the bottom of the General text area
 +
:''function DoYesNoEvent(enum:Object)''
 +
:enum - event to do, This value can either be a Number or a String,
 +
:If it is a Number it will set _root.NumEvent to this value. If it is a String it will set _root.StrEvent to this value if omitted then will use _root.NumEvent
 +
:Other buttons are hidden
 +
:When the yes button is clicked the game will call internally DoEventYes() and then first call the slavegirls DoEventYes() function
 +
:When the yes button is clicked the game will call internally DoEventNo() and then first call the slavegirls DoEventNo() function
  
DoYesNoEvent
+
;DoYesNoEventXY
display yes/no buttons at the bottom of the General text area
+
:display yes/no buttons immediately below the last displayed text, will wrap in the the larger text area as needed
function DoYesNoEvent(enum:Object)
+
:''function DoYesNoEventXY(enum:Object)''
enum - event to do, This value can either be a Number or a String,
+
:enum - event to do, if omitted then will use _root.NumEvent
If it is a Number it will set _root.NumEvent to this value. If it is a String it will set _root.StrEvent to this value
+
:Other buttons are hidden
if omitted then will use _root.NumEvent
+
Other buttons are hidden
+
When the yes button is clicked the game will call internally DoEventYes() and then first call the slavegirls DoEventYes() function
+
When the yes button is clicked the game will call internally DoEventNo() and then first call the slavegirls DoEventNo() function
+
  
 +
;PositionYesNo
 +
:''function PositionYesNo()''
 +
:Reposition the yes/no buttons, generally use this if you add more text after displaying the buttons, say using AfterDoActions or AfterDoSexActions
  
DoYesNoEventXY
+
;ShowYesNoButtons
display yes/no buttons immediately below the last displayed text, will wrap in the the larger text area as needed
+
:''function ShowYesNoButtons()''
function DoYesNoEventXY(enum:Object)
+
:Do not generally use, mainly use DoYesNoEvent, but can be used in DoPlanningActions
enum - event to do, if omitted then will use _root.NumEvent
+
Other buttons are hidden
+
  
 +
;HideYesNoButtons
 +
:''function HideYesNoButtons()''
 +
:hide the yes/no buttons, mainly for use in DoPlanningActions, but can be used elsewhere
  
PositionYesNo
+
===Questions===
function PositionYesNo()
+
Reposition the yes/no buttons, generally use this if you add more text after displaying the buttons, say using AfterDoActions or AfterDoSexActions
+
  
 +
;AskHerQuestions
 +
:ask up to 5 questions
 +
:''function AskHerQuestions(Event1:Object, Event2:Object, Event3:Object, Event4:Object, Event1Label:String, Event2Label:String, Event3Label:String, Event4Label:String, Caption:String, Event5:Object, Event5Label:String)''
 +
:Event1-5
 +
::event to be done when clicking on one of the four choices. Set to 0 hide the option. Event5 is optional
 +
:Event1Label-Event5Label
 +
::the string shown for the question, eg "Runaway screaming" - Event5Label is optional
 +
:Caption
 +
::Caption at the top of the questions, eg "What does she do?"
 +
:Other buttons are hidden
 +
:eg
 +
:<syntaxhighlight lang="actionscript" enclose="div">
 +
_root.AskHerQuestions(301, 302, 303, 0, "Please fuck me", "No way!",
 +
"Well, I'd prefer it in the ass", "", "How does she respond?");
 +
// events 301, 302, 303 will need to be handled in the slavegirls
 +
DoEventNext() function
 +
_root.AskHerQuestions(301, 302, 303, 0, "Please fuck me", "No way!",
 +
"Well, I'd prefer it in the ass", "", "How does she respond?", 304, "How
 +
about my mouth?");
 +
</syntaxhighlight>
  
ShowYesNoButtons
+
;ResetQuestions
function ShowYesNoButtons()
+
:''function ResetQuestions()''
Do not generally use, mainly use DoYesNoEvent, but can be used in DoPlanningActions
+
:Reset and hide all questions
  
 +
;AddQuestion
 +
:''function AddQuestion(Event1:Object, Event1Label:String)''
 +
:Add a question to the list, call 1+ times. Any more than 5 are ignored
  
HideYesNoButtons
+
;PositionQuestions
function HideYesNoButtons()
+
:''function PositionQuestions(lines:Number, main:Boolean)''
hide the yes/no buttons, mainly for use in DoPlanningActions, but can be used elsewhere
+
:Repostions the questions, this is to allow for the case where the game shows some questions and then you choose to alter the displayed text
 +
:lines parameter is normally for internal use
  
 
+
:Special case
Questions
+
:<syntaxhighlight lang="actionscript" enclose="div">
 
+
AskHerQuestions
+
ask up to 5 questions
+
function AskHerQuestions(Event1:Object, Event2:Object, Event3:Object, Event4:Object, Event1Label:String, Event2Label:String, Event3Label:String, Event4Label:String, Caption:String, Event5:Object, Event5Label:String)
+
Event1-5
+
event to be done when clicking on one of the four choices. Set to 0 hide the option. Event5 is optional
+
Event1Label-Event5Label
+
the string shown for the question, eg "Runaway screaming" - Event5Label is optional
+
Caption
+
Caption at the top of the questions, eg "What does she do?"
+
Other buttons are hidden
+
eg
+
_root.AskHerQuestions(301, 302, 303, 0, "Please fuck me", "No way!", "Well, I'd prefer it in the ass", "", "How does she respond?");
+
// events 301, 302, 303 will need to be handled in the slavegirls DoEventNext() function
+
_root.AskHerQuestions(301, 302, 303, 0, "Please fuck me", "No way!", "Well, I'd prefer it in the ass", "", "How does she respond?", 304, "How about my mouth?");
+
 
+
 
+
ResetQuestions
+
function ResetQuestions()
+
Reset and hide all questions
+
 
+
 
+
AddQuestion
+
function AddQuestion(Event1:Object, Event1Label:String)
+
Add a question to the list, call 1+ times. Any more than 5 are ignored
+
 
+
 
+
PositionQuestions
+
function PositionQuestions(lines:Number, main:Boolean)
+
Repostions the questions, this is to allow for the case where the game shows some questions and then you choose to alter the displayed text
+
lines parameter is normally for internal use
+
 
+
Special case
+
 
_root.PositionQuestions(undefined, true);
 
_root.PositionQuestions(undefined, true);
positions the questions in the main window with a translucent background
+
</syntaxhighlight>
 
+
:positions the questions in the main window with a translucent background
  
ShowQuestions
+
;ShowQuestions
function ShowQuestions(Caption:String, main:Boolean) : Number
+
:''function ShowQuestions(Caption:String, main:Boolean) : Number''
eg
+
:eg
 +
:<syntaxhighlight lang="actionscript" enclose="div">
 
_root.ResetQuestions();
 
_root.ResetQuestions();
 
_root.AddQuestion(300, "Fuck me");
 
_root.AddQuestion(300, "Fuck me");
Line 126: Line 137:
 
_root.AddQuestion(302, "Fuck " + _root.ServantName);
 
_root.AddQuestion(302, "Fuck " + _root.ServantName);
 
_root.ShowQuestions("She asks you to...");
 
_root.ShowQuestions("She asks you to...");
 +
</syntaxhighlight>
  
Special case
+
:Special case
 +
:<syntaxhighlight lang="actionscript" enclose="div">
 
_root.ShowQuestions("She asks you to...", true);
 
_root.ShowQuestions("She asks you to...", true);
positions the questions in the main window with a translucent background. The question area is also wider for longer questions
+
</syntaxhighlight>
 
+
:positions the questions in the main window with a translucent background. The question area is also wider for longer questions
 
+
HideQuestions
+
function HideQuestions()
+
Will hide the questions, seldom is there a need to call this. The game hides the questions once pressed. Generally use ResetQuestions() instead unless you wish to preserve any added questions
+
 
+
 
+
General Buttons
+
  
SetActButtonState
+
;HideQuestions
Customise a sex act or day action
+
:''function HideQuestions()''
function SetActButtonState(type:Number, tick:Boolean, available:Boolean, actlabel:String, cost:Number, aduration:Number, shortcut:String)
+
:Will hide the questions, seldom is there a need to call this. The game hides the questions once pressed. Generally use ResetQuestions() instead unless you wish to preserve any added questions
type - the act number to change. see Slave - Planning.rtf
+
tick - is the large tick shown, normally to indicate the act is done
+
available - if false a large slash will indicate you cannot do it
+
actlabel - the button label, html syntax. You must use the existing shortcut
+
cost - the GP cost to do the action
+
aduration - the time to do the action, in hours (1.5 for 1 hour 30 minutes)
+
shortcut - a single letter for the shortcut to use
+
  
These are the standard calls for all buttons
+
===General Buttons===
  
SetActButtonState(1, false, true, "Nothing", 0, 1, "H");
+
;SetActButtonState
SetActButtonState(13, false, true, "Naked", 0, 1, "N");
+
:Customise a sex act or day action
SetActButtonState(17, false, true, "Ponygirl", 0, 1, "Y");
+
:''function SetActButtonState(type:Number, tick:Boolean, available:Boolean, actlabel:String, cost:Number, aduration:Number, shortcut:String)''
SetActButtonState(18, false, true, "Spank " + NameCase(SlaveHimHer), 0, 1, "S");
+
:type - the act number to change. see Slave - Planning.rtf
SetActButtonState(14, false, true, Master, 0, 1, "M");
+
:tick - is the large tick shown, normally to indicate the act is done
SetActButtonState(16, false, true, "Lend " + NameCase(SlaveHimHer), 0, 3, "E");
+
:available - if false a large slash will indicate you cannot do it
SetActButtonState(24, false, true, "Strip Tease", 0, 1, "z");
+
:actlabel - the button label, html syntax. You must use the existing shortcut
SetActButtonState(9, false, true, "Dildo", 0, 1, "D");
+
:cost - the GP cost to do the action
SetActButtonState(10, false, true, "Anal Plug", 0, 1, "P");
+
:aduration - the time to do the action, in hours (1.5 for 1 hour 30 minutes)
 +
:shortcut - a single letter for the shortcut to use
  
SetActButtonState(6, false, true, "Tits-Fuck", 0, 1, "T");
+
:These are the standard calls for all buttons
SetActButtonState(11, false, true, "Lesbian", 0, 1, "L");
+
SetActButtonState(12, false, true, "Bondage", 0, 1, "B");
+
SetActButtonState(15, false, true, "Gang-Bang", 0, 1, "G");
+
SetActButtonState(8, false, true, "Make " + SlaveHimHer + " Masturbate", 0, 1, "U");
+
SetActButtonState(2, false, true, "Touch " + NameCase(SlaveHimHer), 0, 1, "O");
+
SetActButtonState(7, false, true, "Ass Fuck "+ NameCase(SlaveHimHer), 0, 1, "A");
+
SetActButtonState(4, false, true, "Fuck "+ NameCase(SlaveHimHer), 0, 1, "F");
+
SetActButtonState(20, false, true, "69", 0, 1, "6");
+
SetActButtonState(3, false, true, "Lick " + NameCase(SlaveHimHer), 0, 1, "C");
+
  
SetActButtonState(5, false, true, "Blowjob", 0, 1, "J");
+
:*SetActButtonState(1, false, true, "Nothing", 0, 1, "H");
SetActButtonState(25, false, true, "Cum Bath", 0, 1, "w");
+
:*SetActButtonState(13, false, true, "Naked", 0, 1, "N");
SetActButtonState(19, false, true, "Threesome", 0, 1, "3");
+
:*SetActButtonState(17, false, true, "Ponygirl", 0, 1, "Y");
SetActButtonState(21, false, true, "Orgy", 0, 1, "R");
+
:*SetActButtonState(18, false, true, "Spank " + NameCase(SlaveHimHer), 0, 1, "S");
SetActButtonState(23, false, true, "Kiss", 0, 1, "K");
+
:*SetActButtonState(14, false, true, Master, 0, 1, "M");
SetActButtonState(2001, false, true, "Martial\rTraining", 0, 2, "M");
+
:*SetActButtonState(16, false, true, "Lend " + NameCase(SlaveHimHer), 0, 3, "E");
SetActButtonState(2002, false, true, "Pray at\rChurch", 0, 2, "P");
+
:*SetActButtonState(24, false, true, "Strip Tease", 0, 1, "z");
SetActButtonState(2003, false, true, "Relax in\ra Bar", 0, 2, "B");
+
:*SetActButtonState(9, false, true, "Dildo", 0, 1, "D");
SetActButtonState(2004, false, true, "Attend\rCourt", 0, 4, "C");
+
:*SetActButtonState(10, false, true, "Anal Plug", 0, 1, "P");
  
SetActButtonState(1017, false, true, "Break", 0, 2, "R");
+
:*SetActButtonState(6, false, true, "Tits-Fuck", 0, 1, "T");
SetActButtonState(1004, false, true, "Discuss", 0, 1, "D");
+
:*SetActButtonState(11, false, true, "Lesbian", 0, 1, "L");
SetActButtonState(1002, false, true, "Cleaning", 0, 2, "l");
+
:*SetActButtonState(12, false, true, "Bondage", 0, 1, "B");
SetActButtonState(1001, false, true, "Cooking", 0, 2, "C");
+
:*SetActButtonState(15, false, true, "Gang-Bang", 0, 1, "G");
SetActButtonState(1011, false, true, "Expose " + NameCase(SlaveHimHer) + "self", 0, 2, "P");
+
:*SetActButtonState(8, false, true, "Make " + SlaveHimHer + " Masturbate", 0, 1, "U");
SetActButtonState(1019, false, true, "Read a\rBook", 0, 2, "K");
+
:*SetActButtonState(2, false, true, "Touch " + NameCase(SlaveHimHer), 0, 1, "O");
SetActButtonState(1013, false, true, "Acolyte", 0, 2, "A");
+
:*SetActButtonState(7, false, true, "Ass Fuck "+ NameCase(SlaveHimHer), 0, 1, "A");
SetActButtonState(1006, false, true, "Sciences", 50, 2, "S");
+
:*SetActButtonState(4, false, true, "Fuck "+ NameCase(SlaveHimHer), 0, 1, "F");
SetActButtonState(1007, false, true, "Theology", 50, 2, "T");
+
:*SetActButtonState(20, false, true, "69", 0, 1, "6");
SetActButtonState(1010, false, true, "XXX", 50, 2, "X");
+
:*SetActButtonState(3, false, true, "Lick " + NameCase(SlaveHimHer), 0, 1, "C");
SetActButtonState(1012, false, true, "Restarant", 0, 2, "U");
+
SetActButtonState(1014, false, true, "Bar", 0, 2, "B");
+
SetActButtonState(1015, false, true, "Sleazy Bar", 0, 2, "Z");
+
SetActButtonState(1016, false, true, "Brothel", 0, 2, "H");
+
SetActButtonState(1005, false, true, "Make Up", 0, 2, "M");
+
SetActButtonState(1003, false, true, "Exercise", 0, 2, "W");
+
SetActButtonState(1009, false, true, "Dance", 50, 2, "N");
+
SetActButtonState(1008, false, true, "Etiquette\rschool", 50, 2, "E");
+
SetActButtonState(1019, false, true, "", 0, 2);
+
SetActButtonState(1020, false, true, "", 0, 2);
+
SetActButtonState(1021, false, true, "", 0, 2);
+
SetActButtonState(1022, false, true, "Library", 0, 2, "L");
+
SetActButtonState(1023, false, true, "Onsen", 0, 2, "H");
+
SetActButtonState(1024, false, true, "", 0, 2);
+
SetActButtonState(1025, false, true, "", 0, 2);
+
SetActButtonState(1026, false, true, "", 0, 2);
+
SetActButtonState(1027, false, true, "", 0, 2);
+
SetActButtonState(1028, false, true, "", 0, 2);
+
SetActButtonState(1029, false, true, "", 0, 2);
+
  
Notes:
+
:*SetActButtonState(5, false, true, "Blowjob", 0, 1, "J");
DO NOT call this in Initialise() the button will revert to default. Instead call it in UpdateSlave() or LoadGame()
+
:*SetActButtonState(25, false, true, "Cum Bath", 0, 1, "w");
NameCase - function sets first letter to uppercase
+
:*SetActButtonState(19, false, true, "Threesome", 0, 1, "3");
SlaveHimHer - 'him', 'her', 'them'
+
:*SetActButtonState(21, false, true, "Orgy", 0, 1, "R");
 +
:*SetActButtonState(23, false, true, "Kiss", 0, 1, "K");
 +
:*SetActButtonState(2001, false, true, "Martial\rTraining", 0, 2, "M");
 +
:*SetActButtonState(2002, false, true, "Pray at\rChurch", 0, 2, "P");
 +
:*SetActButtonState(2003, false, true, "Relax in\ra Bar", 0, 2, "B");
 +
:*SetActButtonState(2004, false, true, "Attend\rCourt", 0, 4, "C");
  
 +
:*SetActButtonState(1017, false, true, "Break", 0, 2, "R");
 +
:*SetActButtonState(1004, false, true, "Discuss", 0, 1, "D");
 +
:*SetActButtonState(1002, false, true, "Cleaning", 0, 2, "l");
 +
:*SetActButtonState(1001, false, true, "Cooking", 0, 2, "C");
 +
:*SetActButtonState(1011, false, true, "Expose " + NameCase(SlaveHimHer) + "self", 0, 2, "P");
 +
:*SetActButtonState(1019, false, true, "Read a\rBook", 0, 2, "K");
 +
:*SetActButtonState(1013, false, true, "Acolyte", 0, 2, "A");
 +
:*SetActButtonState(1006, false, true, "Sciences", 50, 2, "S");
 +
:*SetActButtonState(1007, false, true, "Theology", 50, 2, "T");
 +
:*SetActButtonState(1010, false, true, "XXX", 50, 2, "X");
 +
:*SetActButtonState(1012, false, true, "Restarant", 0, 2, "U");
 +
:*SetActButtonState(1014, false, true, "Bar", 0, 2, "B");
 +
:*SetActButtonState(1015, false, true, "Sleazy Bar", 0, 2, "Z");
 +
:*SetActButtonState(1016, false, true, "Brothel", 0, 2, "H");
 +
:*SetActButtonState(1005, false, true, "Make Up", 0, 2, "M");
 +
:*SetActButtonState(1003, false, true, "Exercise", 0, 2, "W");
 +
:*SetActButtonState(1009, false, true, "Dance", 50, 2, "N");
 +
:*SetActButtonState(1008, false, true, "Etiquette\rschool", 50, 2, "E");
 +
:*SetActButtonState(1019, false, true, "", 0, 2);
 +
:*SetActButtonState(1020, false, true, "", 0, 2);
 +
:*SetActButtonState(1021, false, true, "", 0, 2);
 +
:*SetActButtonState(1022, false, true, "Library", 0, 2, "L");
 +
:*SetActButtonState(1023, false, true, "Onsen", 0, 2, "H");
 +
:*SetActButtonState(1024, false, true, "", 0, 2);
 +
:*SetActButtonState(1025, false, true, "", 0, 2);
 +
:*SetActButtonState(1026, false, true, "", 0, 2);
 +
:*SetActButtonState(1027, false, true, "", 0, 2);
 +
:*SetActButtonState(1028, false, true, "", 0, 2);
 +
:*SetActButtonState(1029, false, true, "", 0, 2);
  
ShowActButton
+
:Notes:
function ShowActButton(type:Number, showact:Boolean)
+
type - as for SetActButtonState
+
showact - true to show, false to hide, defaults to true
+
  
 +
:DO NOT call this in Initialise() the button will revert to default.  Instead call it in UpdateSlave() or LoadGame()
 +
:NameCase - function sets first letter to uppercase
 +
:SlaveHimHer - 'him', 'her', 'them'
  
HideActButton
+
;ShowActButton
function HideActButton(type:Number)
+
:''function ShowActButton(type:Number, showact:Boolean)''
As above, just hides the button
+
:type - as for SetActButtonState
 +
:showact - true to show, false to hide, defaults to true
  
 +
;HideActButton
 +
:''function HideActButton(type:Number)''
 +
:As above, just hides the button
  
ShowPlanningNext
+
;ShowPlanningNext
function ShowPlanningNext()
+
:''function ShowPlanningNext()''
Show the next button while doing planning actions, and hide other leave/yes/no/questions. Use this if you trigger an event and when done want to continue to the next action in her planning list.
+
:Show the next button while doing planning actions, and hide other leave/yes/no/questions. Use this if you trigger an event and when done want to continue to the next action in her planning list.
  
 +
;HidePlanningNext
 +
:''function HidePlanningNext()''
 +
:Hide the next button while doing planning actions
  
HidePlanningNext
+
;ShowLeaveButton
function HidePlanningNext()
+
:''function ShowLeaveButton()''
Hide the next button while doing planning actions
+
:Show the leave button, and hide other next/yes/no/questions.
  
  
ShowLeaveButton
+
{{Dev-SDKNav|Dev:SDK/Core - Backgrounds|Dev:SDK/Core - Combat}}
function ShowLeaveButton()
+
Show the leave button, and hide other next/yes/no/questions.
+

Latest revision as of 01:15, 7 June 2012

<<first <prev SDK/Core - Buttons next> last>>


SlaveMaker 3 SDK Core Buttons

There are a group of standard buttons in the Core game you can show

Generally use provided functions, avoid directly accessing the movie clips

Button MovieClips[edit]

NextGeneral
next button in day and night events - please use ShowPlanningNext() and

HidePlanningNext() to show/hide

NextEvent
next button for other events - please use DoEvent
Quitter
Leave button, use ShowLeaveButton() and HideLeaveButton()
PlanningButton
planning button on main screen
MorningButton
morning button
EveningButton
morning button
SystemButton
load/save
YesEvent, NoEvent
Yes/No buttons, normally use DoYesNoEvent/DoYesNoEventXY to show
AskQuestions
the list of questions shown, use AskHerQuestions/AddQuestion functions

Functions[edit]

DoEvent
do an event and show the NextEvent button.
Other buttons are hidden
function DoEvent(enum:Object)
enum - event to do. This value can either be a Number or a String, If it is a Number it will set _root.NumEvent to this value. If it is a String it will set _root.StrEvent to this value
When the button is clicked the game will call internally DoEventNext() and then first call the slavegirls DoEventNext() function
eg
_root.DoEvent(400);
eg
_root.NumEvent = 100 + type;
_root.DoEvent();
eg
_root.DoEvent("Snakes" + _root.slrandom(2));
eg
_root.DoEvent("LamiaEscape");

Yes/No[edit]

DoYesNoEvent
display yes/no buttons at the bottom of the General text area
function DoYesNoEvent(enum:Object)
enum - event to do, This value can either be a Number or a String,
If it is a Number it will set _root.NumEvent to this value. If it is a String it will set _root.StrEvent to this value if omitted then will use _root.NumEvent
Other buttons are hidden
When the yes button is clicked the game will call internally DoEventYes() and then first call the slavegirls DoEventYes() function
When the yes button is clicked the game will call internally DoEventNo() and then first call the slavegirls DoEventNo() function
DoYesNoEventXY
display yes/no buttons immediately below the last displayed text, will wrap in the the larger text area as needed
function DoYesNoEventXY(enum:Object)
enum - event to do, if omitted then will use _root.NumEvent
Other buttons are hidden
PositionYesNo
function PositionYesNo()
Reposition the yes/no buttons, generally use this if you add more text after displaying the buttons, say using AfterDoActions or AfterDoSexActions
ShowYesNoButtons
function ShowYesNoButtons()
Do not generally use, mainly use DoYesNoEvent, but can be used in DoPlanningActions
HideYesNoButtons
function HideYesNoButtons()
hide the yes/no buttons, mainly for use in DoPlanningActions, but can be used elsewhere

Questions[edit]

AskHerQuestions
ask up to 5 questions
function AskHerQuestions(Event1:Object, Event2:Object, Event3:Object, Event4:Object, Event1Label:String, Event2Label:String, Event3Label:String, Event4Label:String, Caption:String, Event5:Object, Event5Label:String)
Event1-5
event to be done when clicking on one of the four choices. Set to 0 hide the option. Event5 is optional
Event1Label-Event5Label
the string shown for the question, eg "Runaway screaming" - Event5Label is optional
Caption
Caption at the top of the questions, eg "What does she do?"
Other buttons are hidden
eg
_root.AskHerQuestions(301, 302, 303, 0, "Please fuck me", "No way!",
"Well, I'd prefer it in the ass", "", "How does she respond?");
        // events 301, 302, 303 will need to be handled in the slavegirls
DoEventNext() function
_root.AskHerQuestions(301, 302, 303, 0, "Please fuck me", "No way!",
"Well, I'd prefer it in the ass", "", "How does she respond?", 304, "How
about my mouth?"
);
ResetQuestions
function ResetQuestions()
Reset and hide all questions
AddQuestion
function AddQuestion(Event1:Object, Event1Label:String)
Add a question to the list, call 1+ times. Any more than 5 are ignored
PositionQuestions
function PositionQuestions(lines:Number, main:Boolean)
Repostions the questions, this is to allow for the case where the game shows some questions and then you choose to alter the displayed text
lines parameter is normally for internal use
Special case
_root.PositionQuestions(undefined, true);
positions the questions in the main window with a translucent background
ShowQuestions
function ShowQuestions(Caption:String, main:Boolean) : Number
eg
_root.ResetQuestions();
_root.AddQuestion(300, "Fuck me");
if (_root.CheckBitFlag2(12)) _root.AddQuestion(301, "Fuck my ass");
_root.AddQuestion(302, "Fuck " + _root.ServantName);
_root.ShowQuestions("She asks you to...");
Special case
_root.ShowQuestions("She asks you to...", true);
positions the questions in the main window with a translucent background. The question area is also wider for longer questions
HideQuestions
function HideQuestions()
Will hide the questions, seldom is there a need to call this. The game hides the questions once pressed. Generally use ResetQuestions() instead unless you wish to preserve any added questions

General Buttons[edit]

SetActButtonState
Customise a sex act or day action
function SetActButtonState(type:Number, tick:Boolean, available:Boolean, actlabel:String, cost:Number, aduration:Number, shortcut:String)
type - the act number to change. see Slave - Planning.rtf
tick - is the large tick shown, normally to indicate the act is done
available - if false a large slash will indicate you cannot do it
actlabel - the button label, html syntax. You must use the existing shortcut
cost - the GP cost to do the action
aduration - the time to do the action, in hours (1.5 for 1 hour 30 minutes)
shortcut - a single letter for the shortcut to use
These are the standard calls for all buttons
  • SetActButtonState(1, false, true, "Nothing", 0, 1, "H");
  • SetActButtonState(13, false, true, "Naked", 0, 1, "N");
  • SetActButtonState(17, false, true, "Ponygirl", 0, 1, "Y");
  • SetActButtonState(18, false, true, "Spank " + NameCase(SlaveHimHer), 0, 1, "S");
  • SetActButtonState(14, false, true, Master, 0, 1, "M");
  • SetActButtonState(16, false, true, "Lend " + NameCase(SlaveHimHer), 0, 3, "E");
  • SetActButtonState(24, false, true, "Strip Tease", 0, 1, "z");
  • SetActButtonState(9, false, true, "Dildo", 0, 1, "D");
  • SetActButtonState(10, false, true, "Anal Plug", 0, 1, "P");
  • SetActButtonState(6, false, true, "Tits-Fuck", 0, 1, "T");
  • SetActButtonState(11, false, true, "Lesbian", 0, 1, "L");
  • SetActButtonState(12, false, true, "Bondage", 0, 1, "B");
  • SetActButtonState(15, false, true, "Gang-Bang", 0, 1, "G");
  • SetActButtonState(8, false, true, "Make " + SlaveHimHer + " Masturbate", 0, 1, "U");
  • SetActButtonState(2, false, true, "Touch " + NameCase(SlaveHimHer), 0, 1, "O");
  • SetActButtonState(7, false, true, "Ass Fuck "+ NameCase(SlaveHimHer), 0, 1, "A");
  • SetActButtonState(4, false, true, "Fuck "+ NameCase(SlaveHimHer), 0, 1, "F");
  • SetActButtonState(20, false, true, "69", 0, 1, "6");
  • SetActButtonState(3, false, true, "Lick " + NameCase(SlaveHimHer), 0, 1, "C");
  • SetActButtonState(5, false, true, "Blowjob", 0, 1, "J");
  • SetActButtonState(25, false, true, "Cum Bath", 0, 1, "w");
  • SetActButtonState(19, false, true, "Threesome", 0, 1, "3");
  • SetActButtonState(21, false, true, "Orgy", 0, 1, "R");
  • SetActButtonState(23, false, true, "Kiss", 0, 1, "K");
  • SetActButtonState(2001, false, true, "Martial\rTraining", 0, 2, "M");
  • SetActButtonState(2002, false, true, "Pray at\rChurch", 0, 2, "P");
  • SetActButtonState(2003, false, true, "Relax in\ra Bar", 0, 2, "B");
  • SetActButtonState(2004, false, true, "Attend\rCourt", 0, 4, "C");
  • SetActButtonState(1017, false, true, "Break", 0, 2, "R");
  • SetActButtonState(1004, false, true, "Discuss", 0, 1, "D");
  • SetActButtonState(1002, false, true, "Cleaning", 0, 2, "l");
  • SetActButtonState(1001, false, true, "Cooking", 0, 2, "C");
  • SetActButtonState(1011, false, true, "Expose " + NameCase(SlaveHimHer) + "self", 0, 2, "P");
  • SetActButtonState(1019, false, true, "Read a\rBook", 0, 2, "K");
  • SetActButtonState(1013, false, true, "Acolyte", 0, 2, "A");
  • SetActButtonState(1006, false, true, "Sciences", 50, 2, "S");
  • SetActButtonState(1007, false, true, "Theology", 50, 2, "T");
  • SetActButtonState(1010, false, true, "XXX", 50, 2, "X");
  • SetActButtonState(1012, false, true, "Restarant", 0, 2, "U");
  • SetActButtonState(1014, false, true, "Bar", 0, 2, "B");
  • SetActButtonState(1015, false, true, "Sleazy Bar", 0, 2, "Z");
  • SetActButtonState(1016, false, true, "Brothel", 0, 2, "H");
  • SetActButtonState(1005, false, true, "Make Up", 0, 2, "M");
  • SetActButtonState(1003, false, true, "Exercise", 0, 2, "W");
  • SetActButtonState(1009, false, true, "Dance", 50, 2, "N");
  • SetActButtonState(1008, false, true, "Etiquette\rschool", 50, 2, "E");
  • SetActButtonState(1019, false, true, "", 0, 2);
  • SetActButtonState(1020, false, true, "", 0, 2);
  • SetActButtonState(1021, false, true, "", 0, 2);
  • SetActButtonState(1022, false, true, "Library", 0, 2, "L");
  • SetActButtonState(1023, false, true, "Onsen", 0, 2, "H");
  • SetActButtonState(1024, false, true, "", 0, 2);
  • SetActButtonState(1025, false, true, "", 0, 2);
  • SetActButtonState(1026, false, true, "", 0, 2);
  • SetActButtonState(1027, false, true, "", 0, 2);
  • SetActButtonState(1028, false, true, "", 0, 2);
  • SetActButtonState(1029, false, true, "", 0, 2);
Notes:
DO NOT call this in Initialise() the button will revert to default. Instead call it in UpdateSlave() or LoadGame()
NameCase - function sets first letter to uppercase
SlaveHimHer - 'him', 'her', 'them'
ShowActButton
function ShowActButton(type:Number, showact:Boolean)
type - as for SetActButtonState
showact - true to show, false to hide, defaults to true
HideActButton
function HideActButton(type:Number)
As above, just hides the button
ShowPlanningNext
function ShowPlanningNext()
Show the next button while doing planning actions, and hide other leave/yes/no/questions. Use this if you trigger an event and when done want to continue to the next action in her planning list.
HidePlanningNext
function HidePlanningNext()
Hide the next button while doing planning actions
ShowLeaveButton
function ShowLeaveButton()
Show the leave button, and hide other next/yes/no/questions.


<<first <prev SDK/Core - Buttons next> last>>