Search for: Only Search Titles Edit API
object MeCreateMeme( string sName, int iPriority = 2, int iModifier = 0, int iFlags = MEME_RESUME, object oParent = OBJECT_INVALID); 
Description

This creates a behavior that is defined in a file or library. Once you have created the behavior, if it is the highest priority behavior in an NPC, it will execute.

These memes must be prewritten. A number of standard memes are written in lib_memes. Refer to the object reference guide on the Memetic AI Toolkit website. This guide documents each memetic object, what it does, and how to configure it.

You can attach variables to this meme object. When the meme runs, it can access this data through the use of the global variable MEME_SELF.


Requirements

You must #include "h_ai" to use this function.
This function must be executed by a memetic creature. It can be called inside the code of another memetic object or in a creature's spawn script. Inside a spawn script, or meme script, you must call MeUpdateActions() to cause this meme to be scheduled.

Parameters

sName: The name of the meme, for example "i_wait"
iPriority: The importance of this
behavior: PRIO_HIGH, PRIO_LOW, PRIO_MEDIUM, PRIO_HIGH, PRIO_VERYHIGH. The highest priority meme at a given moment will actually run.
iModifier: The value within a priority band, a number from -100 to 100.
iFlags: These control if the behavior of meme through its lifecycle. Some memes will automatically turn on or off flags their own flags, once it is created. Remember, you can mask flags together, for
example: MEME_RESUME | MEME_REPEAT
oParent: This is either a generator or another meme.

Flags and Constants

Flags are generally used to configure a target object. If you aren't used to using flags, please refer to the section of the User's Guide: Appendix A: Using Flags.

MEME_RESUME: if the meme is interrupted, auto resume the behavior, otherwise destroy it.
MEME_REPEAT: this causes the meme to loop, some memes *must* loop to work, like i_walkwp
MEME_INSTANT: do not create this meme, if there are existing higher priority memes
MEME_IMMEDIATE: create this meme but don't interrupt the current meme
MEME_CHILDREN: Allow multiple children to run, regardless of their return result. Normally, only one successful child to runs. All other children are destroyed once a children ends without returning FALSE via a call to MeSetMemeResult(); If the meme ends without calling MeSetMemeResult(FALSE) the toolkit assumes the child meme succeeds.


Return Result

This function returns an object that represents a memetic behavior.


See Also

plium(), 1234kjhb(), 234235(), 245tte76(), 564j(), 56vcgr(), 67fgjghj(), 67jhjhhj(), Algernon(), Angelica(), Berfield Justin(), Branda(), Bullock Sandra(), Capshaw Jessica(), Davida(), Edna(), Ellen(), Fay(), Frankie(), Hatty(), Henderson Martin(), Hirsch Emile(), JJhSwryP(), Jocelin(), Kennith(), Linda(), Margulies Julianna(), Marianne(), MeClearMemeFlag(), MeDestroyMeme(), MeGetMeme(), MeGetParentGenerator(), MeGetParentMeme(), MeIsMemeSuspended(), MeRestartMeme(), MeResumeMeme(), MeSetMemeResult(), MeStopMeme(), MeSuspendMeme(), Minnie(), Ollie(), Phzqty(), Ramsey(), Randolph(), Shirley(), Sutherland Donald(), Vinnie(), awkwakwa(), bnjjf(), bvjka(), cialin(), deart(), djhdjh78(), djhjd657(), doejd(), fghjk(), gdsg35(), glgslsixw(), hak(), hjda34(), icjxlmzcxg(), ikhsoruh(), jhh76(), jhtyiity(), jilak(), jjhhjhh(), jonn3(), kiolo(), lhajzdcluak(), likod(), njndj768(), qa12se(), qwaq(), qwaqwa(), sdfsfs345(), vbnmkj76(), vbnvbn8(), wymAoJtzRejU(), xaakt(), xvbcb(), yhkty789(), zxcv324(), zxczxcz(), Çhypvf()