Skip to content

Workshop Release v3.0

Latest

Choose a tag to compare

@TIMONz1535 TIMONz1535 released this 03 Jul 20:46
· 18 commits to master since this release

Breaking changes

  • Console command map_logic_reset renamed to map_logic_reload.
  • Output callback arguments now is (ent, activator, caller, value) instead of (ent, activator, value). You need to check the last argument.

New features

  • Added methods Entity.AddOutput Entity.RemoveOutput Entity.GetOutputs with delay and max times to fire support.
  • The controller is respawned by PostCleanupMap.
  • Added helper function controller:TimerCreate similarly controller:TimerSimple. This repeats the behavior and arguments from the timer library, but checks the validity of the controller before callback.
  • controller:GetMetaTarget(name|ent|entities) now accepts a list of entities. For example controller:GetMetaTarget(ents.FindByName("cave_antlion*")).
  • Added method MetaTarget:IsValid() that returns true if at least one nested entity is valid and the controller is valid. This allows you some cases such as SafeRemoveEntity(target) and IsValid(target). However, calling target:Remove() actually also checks the validity, and will not cause an error.

Fixes

  • Improve the controller design imperfection. Now you can create any output for any entity, even those that incorrectly set the activator and caller values in engine. For example, you can now use OnLockedUse on func_door.
  • Fixed a script error when creating a MetaTarget after OnMapLogicInitialized by passing the entity directly.