AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Code Snippets/Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=83)
-   -   [Native] Custom Entities (https://forums.alliedmods.net/showthread.php?t=288739)

Hedgehog Fog 10-06-2016 14:47

[Native] Custom Entities
 

Custom Entities API

Description

This API help you create some custom entities for your mod with some presets like models, size, etc.
It's can be used to create gameplay entities, items, static props.
https://forums.alliedmods.net/showth...12#post2467312


Hedgehog Fog 10-08-2016 11:32

Re: [Native] Custom Entities
 
Useless. RegisterHamFromEntity works incorrect and register hook for all custom entities. So you can't make specific hooks for different custom entities.
And I found bug and buffer overflow problem.

Arkshine 10-08-2016 16:21

Re: [Native] Custom Entities
 
RegisterHamFromEntity works as expected.

Code:

/**
 * Hooks the virtual table for the specified entity's class.
 * An example would be: RegisterHam(Ham_TakeDamage, id, "player_hurt");
 * Look at the Ham enum for parameter lists.
 * Note: This will cause hooks for the entire internal class that the entity is
 *      not exclusively for the provided entity.
 *


Hedgehog Fog 10-08-2016 17:27

Re: [Native] Custom Entities
 
Arkshine,
I know it now, but didn't know it before. I need make some refactoring to make this API usefull. :)

Hedgehog Fog 10-08-2016 21:24

Re: [Native] Custom Entities
 
Updated.
  • Removed some attribute presets:
    • SubmodelIndex
    • SpawnSound
    • RemoveSound
    • IsPickup
    • PickupSound
  • ZOffset replaced to Offset for all axis.
  • Added CE_CheckAssociation function for check association between entity and current plugin (can be usefull for create hooks).

Hedgehog Fog 11-03-2016 08:13

Re: [Native] Custom Entities
 
Updated. A lot of changes.

Moved to plugins, because finished.
https://forums.alliedmods.net/showth...12#post2467312


All times are GMT -4. The time now is 05:43.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.