LifePlay-Revival/Docs/Modding/Functions/makePermanent.txt

13 lines
776 B
Text
Raw Normal View History

2018-04-05 21:18:14 +00:00
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.