Menu

Info_Placement_Helper

Chase Rayment

Info_Placement_Helper is a representation of the Portal 2 info_placement_helper entity.

Class definition:

Info_Placement_Helper(self, x, y, z, name='', xRotation=0, yRotation=0, zRotation=0, radius=16, useHelperAngles=False, forcePlacement=False, startDisabled=False, attachTargetName='', parent='', proxyName='', scriptThinkFunction='', entityScripts='')

  • x is the x position of the object in the world. Required.
  • y is the y position of the object in the world. Required.
  • z is the z position of the object in the world. Required.
  • name is the name of the object. Defaults to blank.
  • xRotation is the rotation of the object in the x axis. Defaults to 0.
  • yRotation is the rotation of the object in the y axis. Defaults to 0.
  • zRotation is the rotation of the object in the z axis. Defaults to 0.
  • radius is the radius that the entity will affect portal placement. Defaults to 16.
  • useHelperAngles controls whether or not the portal should use the helper's angles. Defaults to False.
  • forcePlacement controls whether or not the placement helper should ignore placement rules when placing the portal. Defaults to False.
  • startDisabled controls whether or not the entity should start disabled. Defaults to False.
  • attachTargetName is the name of an entity to force attachment to. Defaults to blank.
  • parent is the entity name of a parent object. Defaults to blank.
  • proxyName is the name of the entity to use for real placement position. Defaults to blank.
  • entityScripts is the name of an entity script. Defaults to blank.
  • scriptThinkFunction is the name of the script think function. Defaults to blank.

More info on the entity: https://developer.valvesoftware.com/wiki/Info_placement_helper

Methods:

  • addOutput(outputName, target, targetInput, parameter='', delay=0, onlyOnce=False)
    Used for adding an output to an entity.

    • outputName is the name of the output, such as OnStartTouch or OnMapSpawn. Required.
    • target is the name of the target entity. Required.
    • targetInput is the name of the input to use on the target, such as Trigger or Kill. Required.
    • parameter is the name of a string parameter to pass to the target. Defaults to blank.
    • delay is the time to delay before firing the output. Defaults to 0.
    • onlyOnce controls whether or not the output should fire only once. Defaults to False.
  • toString(entityID)
    Returns a string, in VMF syntax, representing the object. Used for writing to file.

    • entityID is the ID of the entity. Required.

Related

Wiki: Portal2

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.