What you can’t do (yet)
- You can’t read or react to guns. The game has no gun the player can hold. The seven hand item classes are
Osrat,BasicWieldable,BasicWieldableItem,Detonator,Flashlight,MeleeWeaponandDosimeter, and none of them fires. The two gun scripts in the game files are a demo for particle effects. They are not hand items and keep no ammo, so there is no event and noWeaponKindfor them. (GunShootandGunAimreadInput.GetButtonDown("Fire1"), andParticleMenuonly toggles agunGameObject.) - You can’t use
Hitas a swing event.Hitfires for each hit a target accepts. A swing that hits nothing raises nothing. UseMeleeSwungfor swings. (MeleeWeapon.Hitruns every frame, so it is not a swing point.Hitis raised from the target’s damage call.) Reloadworks on the right hand only.EquippedLeftreads the left hand.- The osrat and the dosimeter are not weapons. They have ammo data, but
KindisNonefor them. - Hit factors do not apply to NPCs or wild animals. A melee hit on an NPC starts a crime reaction but does not deal damage that this API could scale, and a melee hit does not reach wild animals. Animal props, the
Animaltarget, are covered. (Only the classes in the Hit power table implementIDamageReceiver. The NPC branch ofMeleeWeapon.Hitstarts crime, barks and relays and computes no damage.)