Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: hooking in to the outputs of existing map entities?  (Read 97 times)

0 Members and 1 Guest are viewing this topic.

Offline Dazza-chan

  • *
  • +1% chance to make useful post
  • Dazza-chan has no influence.
hooking in to the outputs of existing map entities?
« on: January 18, 2018, 11:42:12 AM »
Is there anyway of hooking in to the outputs of existing map entities not added via mapadd?

I'm trying to send a disable input to an npc_template_maker from a path_track via its OnPass output, however I'm not sure how to do this since the path_track is is in the map to begin with.

I know i could easily use an Instant_trig with the "touchname" command for the entity following the track but i want to know if i can hook into existing entities for future reference.

Offline Dazza-chan

  • *
  • +1% chance to make useful post
  • Dazza-chan has no influence.
Re: hooking in to the outputs of existing map entities?
« Reply #1 on: January 19, 2018, 11:01:06 AM »
To clarify, i know i know it can be done through a simple lua function such as

function Initialize()

   local ent = HL2.FindEntityByName(nil, "ent1")
   if ( ent ~= nil ) then
      HL2.KeyValue(ent, "output1", "ent2,input1,,0,1")
   end
end

But i want to know if its possible to do without using lua through just the mapadd script, for ease of use.

Offline Dazza-chan

  • *
  • +1% chance to make useful post
  • Dazza-chan has no influence.
Re: hooking in to the outputs of existing map entities?
« Reply #2 on: January 19, 2018, 12:25:30 PM »
Answered my own question.

   "event"
      {
      "targetname" "ent1"
      "action" "addoutput"
      "value" "output 2,input,,0,1"
      }

For instance

   "event"
      {
      "targetname" "trap_k_brush"
      "action" "addoutput"
      "value" "OnBreak men2,ignite,,0,1"
      }

Just incase anyone else has this same question at any point.

Offline Astraxis

  • *
  • +1% chance to make useful post
  • Astraxis has no influence.
Re: hooking in to the outputs of existing map entities?
« Reply #3 on: January 19, 2018, 08:34:30 PM »
Props for not deleting all the replies and editing the OP to "nevermind", like 99% of old posts I find when I need help (damn you UT2004 troubleshooting)

Offline Dazza-chan

  • *
  • +1% chance to make useful post
  • Dazza-chan has no influence.
Re: hooking in to the outputs of existing map entities?
« Reply #4 on: January 20, 2018, 01:42:51 AM »
Yea i feel you man, incredibly frustrating when you are trying to learn but theres absolutely no documentation because it all gets deleted. Looking at yout gamebryo engine..