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...")
 
Line 1: Line 1:
 
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 6:
 
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
DoEvent
+
is a Number it will set _root.NumEvent to this value. If it is a String it
do an event and show the NextEvent button.
+
will set _root.StrEvent to this value
Other buttons are hidden
+
:When the button is clicked the game will call internally DoEventNext()
function DoEvent(enum:Object)
+
and then first call the slavegirls DoEventNext() function
enum - event to do. This value can either be a Number or a String,  
+
:eg
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
+
:<syntaxhighlight lang="actionscript" enclose="div">
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
DoYesNoEvent
+
:''function DoYesNoEvent(enum:Object)''
display yes/no buttons at the bottom of the General text area
+
:enum - event to do, This value can either be a Number or a String,
function DoYesNoEvent(enum:Object)
+
:If it is a Number it will set _root.NumEvent to this value. If it is a
enum - event to do, This value can either be a Number or a String,  
+
String it will set _root.StrEvent to this value
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
 
if omitted then will use _root.NumEvent
Other buttons are hidden
+
: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 DoEventYes()
When the yes button is clicked the game will call internally DoEventNo() and then first call the slavegirls DoEventNo() function
+
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
  
DoYesNoEventXY
+
;PositionYesNo
display yes/no buttons immediately below the last displayed text, will wrap in the the larger text area as needed
+
:''function PositionYesNo()''
function DoYesNoEventXY(enum:Object)
+
:Reposition the yes/no buttons, generally use this if you add more text
enum - event to do, if omitted then will use _root.NumEvent
+
after displaying the buttons, say using AfterDoActions or
Other buttons are hidden
+
AfterDoSexActions
  
 +
;ShowYesNoButtons
 +
:''function ShowYesNoButtons()''
 +
:Do not generally use, mainly use DoYesNoEvent, but can be used in
 +
DoPlanningActions
  
PositionYesNo
+
;HideYesNoButtons
function PositionYesNo()
+
:''function HideYesNoButtons()''
Reposition the yes/no buttons, generally use this if you add more text after displaying the buttons, say using AfterDoActions or AfterDoSexActions
+
:hide the yes/no buttons, mainly for use in DoPlanningActions, but can be
 +
used elsewhere
  
 +
===Questions===
  
ShowYesNoButtons
+
;AskHerQuestions
function ShowYesNoButtons()
+
:ask up to 5 questions
Do not generally use, mainly use DoYesNoEvent, but can be used in DoPlanningActions
+
:''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>
  
 +
;ResetQuestions
 +
:''function ResetQuestions()''
 +
:Reset and hide all questions
  
HideYesNoButtons
+
;AddQuestion
function HideYesNoButtons()
+
:''function AddQuestion(Event1:Object, Event1Label:String)''
hide the yes/no buttons, mainly for use in DoPlanningActions, but can be used elsewhere
+
: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
  
Questions
+
:Special case
 
+
:<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 151:
 
_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
+
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");
+
;HideQuestions
SetActButtonState(13, false, true, "Naked", 0, 1, "N");
+
:''function HideQuestions()''
SetActButtonState(17, false, true, "Ponygirl", 0, 1, "Y");
+
:Will hide the questions, seldom is there a need to call this. The game
SetActButtonState(18, false, true, "Spank " + NameCase(SlaveHimHer), 0, 1, "S");
+
hides the questions once pressed. Generally use ResetQuestions() instead
SetActButtonState(14, false, true, Master, 0, 1, "M");
+
unless you wish to preserve any added questions
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");
+
===General 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
SetActButtonState(25, false, true, "Cum Bath", 0, 1, "w");
+
:Customise a sex act or day action
SetActButtonState(19, false, true, "Threesome", 0, 1, "3");
+
:''function SetActButtonState(type:Number, tick:Boolean,
SetActButtonState(21, false, true, "Orgy", 0, 1, "R");
+
available:Boolean, actlabel:String, cost:Number, aduration:Number,
SetActButtonState(23, false, true, "Kiss", 0, 1, "K");
+
shortcut:String)''
SetActButtonState(2001, false, true, "Martial\rTraining", 0, 2, "M");
+
:type - the act number to change. see Slave - Planning.rtf
SetActButtonState(2002, false, true, "Pray at\rChurch", 0, 2, "P");
+
:tick - is the large tick shown, normally to indicate the act is done
SetActButtonState(2003, false, true, "Relax in\ra Bar", 0, 2, "B");
+
:available - if false a large slash will indicate you cannot do it
SetActButtonState(2004, false, true, "Attend\rCourt", 0, 4, "C");
+
: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
  
SetActButtonState(1017, false, true, "Break", 0, 2, "R");
+
:These are the standard calls for all buttons
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:
+
:*SetActButtonState(1, false, true, "Nothing", 0, 1, "H");
DO NOT call this in Initialise() the button will revert to default. Instead call it in UpdateSlave() or LoadGame()
+
:*SetActButtonState(13, false, true, "Naked", 0, 1, "N");
NameCase - function sets first letter to uppercase
+
:*SetActButtonState(17, false, true, "Ponygirl", 0, 1, "Y");
SlaveHimHer - 'him', 'her', 'them'
+
:*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");
  
ShowActButton
+
:*SetActButtonState(5, false, true, "Blowjob", 0, 1, "J");
function ShowActButton(type:Number, showact:Boolean)
+
:*SetActButtonState(25, false, true, "Cum Bath", 0, 1, "w");
type - as for SetActButtonState
+
:*SetActButtonState(19, false, true, "Threesome", 0, 1, "3");
showact - true to show, false to hide, defaults to true
+
:*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);
  
HideActButton
+
:Notes:
function HideActButton(type:Number)
+
As above, just hides the button
+
  
 +
: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'
  
ShowPlanningNext
+
;ShowActButton
function ShowPlanningNext()
+
:''function ShowActButton(type:Number, showact:Boolean)''
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.
+
: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
  
HidePlanningNext
+
;ShowPlanningNext
function HidePlanningNext()
+
:''function ShowPlanningNext()''
Hide the next button while doing planning actions
+
: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
+
;ShowLeaveButton
function ShowLeaveButton()
+
:''function ShowLeaveButton()''
Show the leave button, and hide other next/yes/no/questions.
+
:Show the leave button, and hide other next/yes/no/questions.

Revision as of 00:45, 3 April 2012

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

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

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

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

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

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.