LifePlay-Revival/Docs/Modding/Functions/makePermanent.txt
2018-04-06 04:18:14 +07:00

12 lines
776 B
Text

Actor.makePermanent()
Normally following generatePersonTemporary(), this turns a temporary actor into a permanent actor that persists after the current scene ends. Does nothing if called on an already permanent actor.
EXAMPLE:
// Generate someone who is into the player's gender
InterestedPerson = generatePersonTemporary()
While !InterestedPerson.isInterestedIn(Player)
InterestedPerson = generatePersonTemporary() // use this instead of GeneratePerson() because otherwise there would be too many (depending how many loops it takes to generate oen that's into the player) permanent actors who appear out of nowhere.
Endwhile
InterestedPerson.makePermanent() // now that an interested person is generated, we can make them permanent now.