Editing Main Page

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 7: Line 7:
Each NPC run in its own process. The NPC scripts have functions as well as callbacks.  
Each NPC run in its own process. The NPC scripts have functions as well as callbacks.  


Since v1.5, adding an npc is simple as a call to [[ConnectNPC]] and if you do not want to give npc any artificial intelligence, the script parameter can be omitted.  
Since v1.5, adding an npc is simple as a call to [[ConnectNPC]] and if you do not want to give npc AI, the script parameter can be omitted.  
{| style=height:1em
{| style=height:1em
|scope="col" style="width: 300px; text-align:left; vertical-align: top;"|  
|scope="col" style="width: 300px; text-align:left; vertical-align: top;"|  
Line 40: Line 40:
* [[OnNPCClassSelect]]  
* [[OnNPCClassSelect]]  
* [[OnServerShareTick]]
* [[OnServerShareTick]]
*[[OnTimeWeatherSync]]
==Constants==
==Constants==
* [[Bodypart| BodyParts]]
* [[Bodypart| BodyParts]]
Line 46: Line 45:
* [[Keys|Game Keys]]
* [[Keys|Game Keys]]
* [[Player_States|Player States]]
* [[Player_States|Player States]]
* [[Play_Flags|Play Flags]]
== Classes ==
== Classes ==
*[[Vector]]
*[[Vector]]
Line 65: Line 63:
* [[GetPlayerTeam]]  
* [[GetPlayerTeam]]  
* [[GetPlayerSlotWeapon]]  
* [[GetPlayerSlotWeapon]]  
* [[GetPlayerSlotAmmo]]  
* [[GetPlayerSlotAmmo]]
*[[GetPlayerSpeed]]
*[[GetPlayerAction]]
* [[WhereIsPlayer]]  
* [[WhereIsPlayer]]  
== Modules ==
== Modules ==
Line 73: Line 69:
* [[LibAction]]
* [[LibAction]]
* [[npcmodule]] (to be renamed)
* [[npcmodule]] (to be renamed)
* [[z-finder]]  
* [[z-finder]]
== v1.8 ==
== Bug List ==
* [[Suicide]]
* [[Bug_List_One|List One]]
* [[SetMyHealth]]
* [[GetMyHealth]]
* [[LookAtPos]]
* [[LookAtPlayer]]
* [[GetMyClass]]
* [[RequestClassAbs]]
* [[AmISpawned]]
* [[GetMySkin]]
* [[GetMyTeam]]
* [[GetMyArmour]]
* [[SendPrivMsg]]
* [[SetConfig]]
* [[GetPlayerColor]]
* [[GetMyColor]]
* [[IsPlaybackRunning]]
* [[IsPlaybackPaused]]
  ||  
  ||  
* [[StartRecordingPlayback]]
* [[StartRecordingPlayback]]
Line 114: Line 94:
* [[GetMyName]]  
* [[GetMyName]]  
* [[GetMyID]]  
* [[GetMyID]]  
* [[QuitServer]]
* [[QuitServer]]  
* [[RequestClass]]
==Advanced functions(v1.5+)==
* [[ReqeustClassAbs]]
* [[RequestSpawn]]
* [[GetTickCount]]
* [[GetClosestPlayer]]
* [[GetSlotFromWeaponId]]
* [[FaceNPCToPlayer]]
==Advanced functions==
* [[SendOnFootSyncData]]
* [[SendOnFootSyncData]]
* [[SendOnFootSyncDataEx]]
* [[SendOnFootSyncDataEx]]
Line 132: Line 105:
* [[FireSniperRifle]]
* [[FireSniperRifle]]
* [[FireSniperRifleEx]]
* [[FireSniperRifleEx]]
* [[FireProjectile]]
* [[EnterVehicle]]
* [[SendShotInfo]]
* [[SendShotInfo]]
* [[SendDeathInfo]]
* [[SendDeathInfo]]
* [[GetLocalValue]]
* [[GetLocalValue]]
* [[SetLocalValue]]
* [[SetLocalValue]]
* [[GetSlotFromWeaponId]]
* [[FaceNPCToPlayer]]
* [[GetTickCount]]
* [[GetClosestPlayer]]
== Functions used only in server scripts==
== Functions used only in server scripts==
* [[ConnectNPC]]
* [[ConnectNPC]]
Line 147: Line 124:
* [[F]]
* [[F]]
* [[Examples]] (Remote calls)
* [[Examples]] (Remote calls)
* [[StartRecordingAllPlayerData]] (v1.8)
* [[StopRecordingAllPlayerData]]
* [[PutServerInRecordingMode]]
* [[StopServerInRecordingMode]]
* [[IsPlayerRecording]]
* [[IsServerInRecordingMode]]
* [[ConnectMultipleNpcs]]
* [[StopConnectingMultipleNpcs]]
* [[Server.cfg|server.cfg values]]
==Tools==
==Tools==
* [[recupdate]]
* [[recupdate]]
Line 169: Line 137:
*[[WriteFloat]]
*[[WriteFloat]]
*[[WriteString]]
*[[WriteString]]
==Pickup==
==More==
*[[FireProjectile]]
*[[RequestClass]]
*[[RequestSpawn]]
*[[ClaimPickup]]
*[[ClaimPickup]]
*[[IsPickupStreamedIn]]
*[[IsPickupStreamedIn]]
Line 180: Line 151:
*[[OnPickupDestroyed]]
*[[OnPickupDestroyed]]
*[[OnPickupUpdate]]
*[[OnPickupUpdate]]
==Checkpoint==
*[[OnCheckpointStreamIn]]
*[[OnCheckpointStreamIn]]
*[[OnCheckpointDestroyed]]
*[[OnCheckpointDestroyed]]
Line 191: Line 161:
*[[ClaimEnterCheckpoint]]
*[[ClaimEnterCheckpoint]]
*[[ClaimExitCheckpoint]]
*[[ClaimExitCheckpoint]]
*[[GetCheckpointCount]]
*[[OnTimeWeatherSync]]
==Vehicle==
*[[EnterVehicle]]
*[[GetVehicleDriver]]
*[[GetVehicleDriver]]
*[[GetVehicleModel]]
*[[GetVehicleModel]]
Line 202: Line 170:
*[[GetVehicleHealth]]
*[[GetVehicleHealth]]
*[[GetVehicleDamage]]
*[[GetVehicleDamage]]
*[[ExitVehicle]]
*[[GetPlayerSpeed]]
*[[ExitVehicleEx]]
==Objects==
*[[OnObjectStreamIn]]
*[[OnObjectDestroyed]]
*[[OnObjectUpdate]]
*[[IsObjectStreamedIn]]
*[[IsObjectStreamedIn]]
*[[GetObjectModel]]
*[[GetObjectModel]]
Line 218: Line 181:
*[[ClaimObjectShot]]
*[[ClaimObjectShot]]
*[[GetObjectCount]]
*[[GetObjectCount]]
*[[GetCheckpointCount]]
*[[ExitVehicle]]
*[[ExitVehicleEx]]
*[[GetPlayerAction]]
== More ==
== More ==
*[[NPC Installation]]
*[[NPC Installation]]
* [[Squirrel Standard Library Functions]]
* [[Squirrel Standard Library Functions]]
* [[Special:WikiForum| Forum]]
* [[NPCHide]]
* [[NPCHide]]
* [[Command-line usage]]
* [[Command-line usage]]
Line 230: Line 198:
'''04 February 2023: Hiding/Changing name of NPC In-Game New Plugin. [[NPCHide|see]]
'''04 February 2023: Hiding/Changing name of NPC In-Game New Plugin. [[NPCHide|see]]
</poem>
</poem>
<Poem style="border: 2px solid #d6d2c5; background-color: #FFC0CB; ">
<Poem style="border: 2px solid #d6d2c5; background-color: #ffff00; ">
'''29 February 2024: NPC v1.8 Beta P1 is released'''. (new) [[V1_8_beta_release_notes|'''click here''']]
'''28 August 2023: NPC v1.7 Beta 2 is released'''. (new) [[V1_7_beta2_release_notes|'''click here''']]
</poem>
<Poem style="border: 2px solid #d6d2c5; background-color: #00ff00; ">
'''08 October 2023: NPC v1.7 Beta 3 is released'''. (new) [[V1_7_beta3_release_notes|'''click here''']]
</poem>
</poem>
Please note that all contributions to NPC for VCMP 0.4 Servers may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see NPC for VCMP 0.4 Servers:Copyrights for details). Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)