Objective Functions
MissionLog
Adds missions/jobs/objectives on the Player's mission log.
Syntax
MissionLog clear_all
-- Clears all objectives from the log
MissionLog add_primary,[obj],[text/string]
-- Adds primary objective to the log
MissionLog add_secondary,[obj],[text/string]
-- Adds secondary objective to the log
MissionLog done,[obj1],[obj2], ..
-- Objective(s) marked as done
MissionLog fail,[obj1],[obj2], ..
-- Objective(s) marked as failed
MissionLog removed,[obj1],[obj2], ..
-- Objective(s) removed without a trace
MissionLog disable
-- Mission log is disabled
MissionLog enable
-- Mission log is enabled
Example
// From ai_mission_jwb.p3s
st_start
{
group Neutral
patterns
{
pt_default
{
actions
{
PlayerKarma hide
EntFireInput "lpp,GiveWeapon:p3_weapon_taser"
EntFireInput "pcc,Command:use p3_weapon_taser"
ExecutePattern .xpt_show_momleft
ExecutePattern st_util.xpt_ShowMissionDesc
// Adds the objective to the Player's log "Jen must survive"
MissionLog add_primary,JenSurvive,#P3_JWB_PRIMARY_JEN
ExecutePattern .xpt_secondary
ShowMessage #P3_JWB_START
ShowMessage #P3_JWB_HELPER01
Pattern pt_loop
}
}
// All Soccer Moms have left
pt_end
{
actions
{
// Objectives marked as done
MissionLog done,MomsLeft
MissionLog done,JenSurvive
SetAttr "NonLethalDone 1"
IfAttr "PoliceIsHere == 1 RemoveAttr NonLethalDone"
// Player didn't harm anyone
CheckAttr "NonLethalDone MissionLog done,NonLethal"
EntFireInput fade_in,fade
Wait 1
EntFireInput "pcc,Command:video_exitcmd jwb_3 p3_end_mission"
}
}
}
}
MissionSave
Unused Postal3Script function.
Warning
Not recommended to use.
Syntax
MissionSave [string]
-- Saves the game
Technical Details
When "MissionSave" is called in p3s, it will do "save P3M_[string] mission [string]" in console, where [string] is replaced with the parameter.
It was to be used or related to 'MissionLog', but it looks like it's underdeveloped.
Example
// This will create a p3m_b4_zombie_ambush.sav and .tga file in the SAVE folder
MissionSave b4_zombie_ambush
MissionBriefing
Unused Postal3Script function
Shows a message on the screen with black background, with a "Press ENTER to continue" prompt.
Note
Equivalent to gameui_show_p3_briefdlg [string]
console command.
Example
// This will show the very first text screen of Paradise Bridge level
MissionBriefing "#P3_PDB_T01_ONSCREEN"
// This will do the same, but after the pdb_00.bik stopped playing after execution
EntFireInput "pcc,Command:video_exitcmd pdb_00 gameui_show_p3_briefdlg #P3_PDB_T01_ONSCREEN"