home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Singles (French)
/
Singles-FrenchVersion-Win95.iso
/
data1.cab
/
Statemachine
/
questErotic9.lua
< prev
next >
Wrap
Text File
|
2004-03-05
|
2KB
|
81 lines
beginStateMachine()
-- called when questor builds up all known questScripts
onEnter(function(msg)
print("questErotic9 entered");
setState("initial");
end )
-- on game over: relationship conditions get reset to 0 and all quests are reset to initial
onMsg("questreset", function(msg)
setState("initial");
end )
onDefault( function(msg)
--print("################## questErotic9-State: ".. getState());
--setState("initial");
end )
---------------------------------------------------------------------------------------------------------------------------------------
state("initial")
onMsg("checkCondition", function(msg)
local mike = getParent().getParent().getCharacter(MIKE);
local elaine = getParent().getParent().getCharacter(ELAINE);
if ( -- condition here
----------------
min( mike.getRelationshipCondition(ELAINE, REL_EROTIC),
elaine.getRelationshipCondition(MIKE, REL_EROTIC) ) >= 9
and
mike.getObjectsWithBehavior("doublebed")[1]
)
----------------
then
-- go to talk position
--mike.cancelCurrentActivity();
elaine.queueCommand("pm_talkCutscene", "talkCutscene", mike, "questErotic9");
mike.queueCommand("pm_holdBehind", "holdBehind", elaine, "", false, true);
sendDelayedMsgThis("holding", 3000, "");
setState("talktome");
end
end )
state("talktome")
----------------
onMsg("talking", function(msg)
if (msg.data == "questErotic9") then
popupConversation("dialogErotic9");
setState("donetalktome");
end
end )
state("donetalktome")
onMsg("yes", function(msg)
local mike = getParent().getParent().getCharacter(MIKE);
local elaine = getParent().getParent().getCharacter(ELAINE);
mike.cancelCurrentActivity();
elaine.cancelCurrentActivity();
elaine.queueCommand("pm_getIntimateBed", "getIntimateBed", mike, "", false, true);
setState("done");
end )
---------------------------------------------------------------------------------------------------------------------------------------
state("done")
-- sackgasse hier
endStateMachine()