home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Singles (French)
/
Singles-FrenchVersion-Win95.iso
/
data1.cab
/
Statemachine
/
questRomance8.lua
< prev
next >
Wrap
Text File
|
2004-03-05
|
2KB
|
60 lines
beginStateMachine()
-- called when questor builds up all known questScripts
onEnter(function(msg)
print("questRomance8 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 )
---------------------------------------------------------------------------------------------------------------------------------------
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_ROMANCE),
elaine.getRelationshipCondition(MIKE, REL_ROMANCE) )>=8 )
----------------
then
-- go to talk position
print("questRomance8 - go to waitHug");
setState("waitCouchKiss");
end
end )
state("waitCouchKiss")
onMsg("queueInteraction", function(msg)
print("questRomance8 - queueInteraction: " .. msg.data);
local mike = getParent().getParent().getCharacter(MIKE);
local elaine = getParent().getParent().getCharacter(ELAINE);
if (msg.data == "getIntimateSofa") then
setState("done");
popupConversation("dialogRomance8");
end
end )
---------------------------------------------------------------------------------------------------------------------------------------
state("done")
-- sackgasse hier
endStateMachine()