Add some NPC stuff

This commit is contained in:
Vortrex
2020-12-24 19:39:31 -06:00
parent e77a9d7324
commit 42fb4720a6

View File

@@ -8,47 +8,58 @@
// TYPE: Server (JavaScript) // TYPE: Server (JavaScript)
// =========================================================================== // ===========================================================================
const triggerSource = {
player,
npc,
vehicle,
business,
house,
};
const NPC = { const NPC = {
Trigger: { Trigger: {
farProximity, farProximity, // Comes within a far distance of NPC
mediumProximity, mediumProximity, // Comes within a medium distance of NPC
nearProximity, nearProximity, // Comes within a close distance of NPC
enterLineOfSight, enterLineOfSight, // Enters the NPC's line of sight
exitLineOfSight, exitLineOfSight, // Leaves the NPC's line of sight
pedCollision, pedCollision, // Bumps into ped on foot
vehicleCollision, vehicleCollision, // Bumps into ped with a vehicle
shootGun, shootGun, // Shoots a gun (target isn't a factor, it's just about only shooting a gun in general)
swingMelee, swingMelee, // Swings a melee weapon (target doesnt matter, it's just about only swinging a melee weapon in general)
stealOccupiedVehicle, hotwireVehicleStart, // Begin attempt to hotwire a vehicle
stealUnoccupiedVehicle, hotwireVehicleFail, // Failed to hotwire a vehicle
hotwireVehicleStart, hotwireVehicleSucceed, // Succeeded at hotwiring a vehicle
hotwireVehicleFail, vehicleAlarmStart, // Vehicle alarm goes off
hotwireVehicleSucceed, vehicleAlarmStop, // Vehicle alarm shuts off (disabled, battery dead, damaged, or just turned off legitly)
vehicleAlarmStart, sirenStart, // Any vehicle with a siren that gets activated
varAlarmStop, sirenStop, // Any vehicle with a siren that gets deactivated
sirenStart, vehicleEnter, // Enters any vehicle
sirenStop, vehicleExit, // Exits any vehicle
vehicleEnter, propertyEnter, // Enters any interior
vehicleExit, propertyExit, // Exits any interior
interiorEnter, attackedByMelee, // Any element is attacked by melee weapon
interiorExit, attackedByGun, // Any element is attacked by gun
attackedByMelee, attackedByFist, // Any element is attacked by fist
attackedByGun
}, },
Condition: { Condition: {
isInLineOfSight, isInLineOfSight,
isFarProximity, isFarProximity,
isMediumProximity, isMediumProximity,
isNearProximity, isNearProximity,
isEnemyFaction, isEnemyClan,
isAllyFaction, isAllyClan,
isSameFaction,
isSameClan, isSameClan,
isNotInClan,
isLawEnforcement, isLawEnforcement,
isFirefighter,
isParamedic,
isCriminal, isCriminal,
hasWantedLevel, hasWantedLevel,
isSelfVehicle, isSelfVehicle,
isPlayerVehicle,
isOtherVehicle, isOtherVehicle,
isClanVehicle,
isEmergencyVehicle, isEmergencyVehicle,
isPoliceVehicle, isPoliceVehicle,
isDriver, isDriver,
@@ -64,6 +75,9 @@ const NPC = {
isSniper, isSniper,
isRPG, isRPG,
isFlameThrower, isFlameThrower,
isTalking,
isShouting,
isWhispering,
}, },
Response: { Response: {
shout, shout,
@@ -77,7 +91,9 @@ const NPC = {
fleeRun, fleeRun,
attackMelee, attackMelee,
attackFist, attackFist,
walkToward,
runToward, runToward,
sprintToward,
crouch, crouch,
phoneCall, phoneCall,
walkieTalkieMessage, walkieTalkieMessage,
@@ -86,9 +102,12 @@ const NPC = {
fleeTo, fleeTo,
driveTo, driveTo,
enterVehicle, enterVehicle,
exitVehicle,
pullOutOfVehicle,
enterProperty,
} }
}; };
function beginNPCInteraction() { function npcTrigger(triggerName, triggerSource) {
} }