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