Mod Events - ak86/Milk-Mod-Economy GitHub Wiki
Mod sends out "MME_MilkCycleComplete" event after script processes all actors adding milk
Mod listens to events:
RegisterForModEvent("MME_AddMilkMaid", "onMME_AddMilkMaid")
- makes target, a Milkmaid, use this to make Player MilkmaidRegisterForModEvent("MME_AddMilkSlave", "onMME_AddMilkSlave")
- makes target, a MilkSlaveRegisterForModEvent("MME_Milking", "onMME_Milking")
- initiates milking cycle by external modRegisterForModEvent("SlaveToggle", "OnSlaveToggle")
- toggles actor slave mode, adds actor to milkslave faction, this is inteded mostly for player enslavement
SexLab:
RegisterForModEvent("OrgasmStart", "OnSexLabOrgasm")
- applies Lactation effects to milk maids/slaves during orgasm if they have 1 milk and reduces their milk by 1, if animation has tag "Masturbation", adds cum/semen potionRegisterForModEvent("AnimationStart", "OnSexLabStart")
- initiates milking cycle if "3J Straight Breastfeeding" or "3J Lesbian Breastfeeding" animation played on milkmaid, animations come with Sexlab 1.6 or NSAP for earlier versions of SLRegisterForModEvent("StageStart", "OnSexLabStart")
- initiates milking cycle if "3J Straight Breastfeeding" or "3J Lesbian Breastfeeding" animation played on milkmaid/slave, this one is used if player have foreplay enabled in sexlabRegisterForModEvent("AnimationEnd", "OnSexLabEnd")
- finishes milking, if it was triggered by SL animationRegisterForModEvent("DeviceVibrateEffectStart", "OnVibrateStart")
- vibration event by DD
Examples:
;Send Add Milkmaid Event
int MME_AddMilkMaid = ModEvent.Create("MME_AddMilkMaid")
ModEvent.PushForm(MME_AddMilkMaid, akSpeaker/akTarget/playerRef)
ModEvent.Send(MME_AddMilkMaid)
int MME_SlaveToggle = ModEvent.Create("MME_SlaveToggle")
ModEvent.PushForm(MME_SlaveToggle, akSpeaker/akTarget/playerRef)
ModEvent.Send(MME_SlaveToggle)
MilkSlave is will not work with player, player have reserved slot in in MilkMaid array, player slavery should be toggled with "MME_SlaveToggle"
int MME_AddMilkSlave = ModEvent.Create("MME_AddMilkSlave")
ModEvent.PushForm(MME_AddMilkSlave, akSpeaker/akTarget, Level, Milk)
ModEvent.Send(MME_AddMilkSlave)
This describes what happends after event recieved by MME:
;Add Milkmaid Event received
Event onMME_AddMilkMaid(Form Sender)
actor akActor = Sender as Actor
if MilkQ.MILKmaid.find(akActor) != -1 ;Check if target is already milkmaid
MilkQ.AssignSlot(akActor) ;make target milkmaid
else
Notification( "Target already milkmaid" )
endif
EndEvent
;Send Milking Event - this used to trigger milking, probably can be used if ordered by master to self milk or maybe some usercase i cant think of
Function Send_ModEvent_MME_Milking()
int handle = ModEvent.Create("MME_Milking")
if (handle)
ModEvent.PushForm(handle, akActor)
ModEvent.PushInt(handle, 4)
;Milking Mode, should probably leave at 4, read below for description
ModEvent.PushInt(handle, 0)
;MilkingType, 0 or 1
ModEvent.Send(handle)
endIf
EndFunction
;Milking Event received
Event onMME_Milking(Form Sender, Int Mode, Int MilkingType)
actor akActor = Sender as Actor
if akActor.GetActorBase().GetSex() == 1
int i = MilkQ.MILKmaid.find(akActor)
if i != -1
MilkQ.Milking(akActor, i, Mode, MilkingType)
else
Debug.Notification( "Target is not a milkmaid" )
endif
else
Debug.notification("Only works on females")
endif
EndEvent
;MilkQ.Milking(akActor, i, Mode, MilkingType)
;*i is no longer used but left as it is
;Mode == 0 - MilkPump Milking\Fuck-Machine
;Mode == 1 - Other Milking(not milkpump), script will check conditions and change to 2 or 3 or stay as 1 (hand-milking)
;Mode == 2 - Equipment Milking, set above^
;Mode == 3 - Living armor Milking, set above^
;Mode == 4 - Called by other mods, runs milking script, expressions and moans, no animations
;MilkingType == 0 normal/none milkpump
;MilkingType == 1 bound/disable player control untill all milk milked