Garry's Mod

Garry's Mod

[VJ Base] Humanimal SNPCs: Part 1 - The Humanimal's [Update!]
Zobrazuje se 1–10 z 37 položek
< 1  2  3  4 >
Aktualizace: 9. lis. v 18.30
provedl Random72638

General Stuff
- Minor optimizations.
- Improved ranged projectile code, where now the SNPCs will use the 'Line' fire method if an enemy is close, or if either the SNPC or enemy have a surface detected above them.
- Ranged arc trajectory is a little better.


Major Change
This change won't directly affect the average gmod player, but I've moved a lot of code into its own separate Lua file as its own library, where it contains a majority of new mechanics and features that can be easily used for new or current SNPCs.

Currently, my new Humanimal SNPCs I've been working on use this library format, which has made it much easier to update and maintain. I've tried my best to make the code readable and clean in case other users want to have a look at it, and use some of the code for their own SNPCs. To use the library, just put 'include('vj_base/extensions/uni.lua')' at the top of you SNPC's Lua init.

More functions and features are planned to be packed into the new library.

Current SNPC's using this base and their updates.
Humanimal [Warden]
- Added ground slam attack.
- Taunt on hit, and on killing a target.
- Rock throw range attack is tied to the material of the ground they are currently standing on.
- Proper landing on ground animation and sounds.
- Will shift to regular running to a more aggressive charge when pursuing an enemy.
- Majorly improved bullet ricochet system.
- Slightly dynamic ranged projectile trajectory. Straight if close, and arc if the enemy is far away.
- Water extinguishes fire.
- Will extinguish itself if on fire.
- Will locate and eat gibs to regain health.
- Gesture attacks.
- Can break down doors.
- Certain events can spawn small parasites. E.g, damaged or death.
- Fire cancels out parasite spawning.
- Properly handled visual effects applied to the player when hitting them.
- Code is much cleaner and readable.

Aktualizace: 20. říj. v 0.53
provedl Random72638

- Updated post door break reaction anim code to accept table and string.

Aktualizace: 20. říj. v 0.49
provedl Random72638

- Small fix.
- For door breaking, made the code accept both gesure and sequence anims, and corrected time lock when doing the door break anim.

Aktualizace: 20. říj. v 0.33
provedl Random72638

- FIxed wrong convar assigned to the break door function.

Aktualizace: 19. říj. v 5.37
provedl Random72638

- Newborns and young cicada's cannot borrow now.

Aktualizace: 19. říj. v 5.30
provedl Random72638

- Optimized the handling of the cicada's bonemerged model, now shortened into one function for both applying the bonemerge to the SNPC on spawn and death model.

- New burrowing mechanic, where if on valid materials like dirt or grass, the Humanimal's will burrow underground to hide for a random period of time before popping back up.

- Changed timer for reviving to be from 1 - 180 second, cleaned up revive code a bit and added the chance the SNPC to remember the enemy that killed it when reviving.

- Small value changes and very minor optimizations to multiple functions.

- For retreating, optimized the function and made it more centered and robust.

- Very minor bone randomization.

- Fixed issue with error popping up if you spawned and quickly removed the SNPC in cases that causes them to flap or vibrate their wings.

- Bunch of small changes.

Aktualizace: 8. říj. v 4.49
provedl Random72638

- Optimised and simplified the ranged projectile code.
- Lowered min distance for ranged attacks.
- Added chance for the Humanimals to find cover when alerted.
- Minor optimizations and tweaks along various functions.
- Hopefully improved most functions that force the SNPC to reposition or take cover.

Aktualizace: 26. zář. v 9.24
provedl Random72638

[ADDITIONS]
- If the SNPC has empty eyes, then they cannot spawn eye gibs when gibbed.
- Mother Humanimal's won't spawn in support if the enemy is within 800 units of their own position.


[CHANGES]
- Parasite chance to spawn from humanimal being damaged was changed from 30 - 45
- Moved all code form the old BeforeDamage to the new OnDamaged function with some minor optimizations.
- SNPCs no longer can do alert sequence if the enemy is within 1000 units close to them.
- Gibs now have a 1 - 3 chance to have a particle attached to them when the SNPC is gibbed.
- Parasite spawning code has now all been organized and combined into a single function instead of separate functions for different circumstances. These changes streamlined the parasite handling, allowed the removal of a lot of old code.
- Parasites that are spawned through the explosive death function now use the new parasite spawning function, allowing me to remove more code.

Aktualizace: 22. zář. v 21.53
provedl Random72638

[FIXES]
- Fixed error with mother birthing support.

[CHANGES]
- Slight cleanup of birth support code.
- If controlling the mother, the snpc won't spawn support.
- Made it so Newborns cannot spawn parasites on damaged or killed.
- Humanimal's now require a line of sight of the light entities to move to them instead of just moving towards them without even seeing them.

Aktualizace: 21. zář. v 6.10
provedl Random72638

- Added OnGround check before moving to an attracted light source.
- SNPC no longer still moves around even is spawned as guard or set to guard.