instance and AddOutput targetname
I have started to work with self created instances and ran into a problem:
- relay_1 => OnTrigger => AddOutput => relay_2 OnTrigger:<targetname>:Disable::0:1
Both relays and the <targetname> are entities within the instance.
But it does not work, because of the Prefix-Fixup-Name of the instance: Prefix-<targetname>.
How can I get this to work?
To send inputs to instances there are two ways:
1. My Output named: OnTrigger
Target entity: instanceFixUpName-EntityInsideInstnaceName
Input: TheInputYouWant
- read in the wiki how to create your instance together with a func_instance_io_proxy
BrainstoneX wrote:
To send inputs to instances there are two ways:
[...]
- I don't want to send an Output to my instance.
- I do want to send an Output within the instance, where the is the parameter.
Inside of instances you don't need to call the target entities prefix-targetname, just targetname. I am 100% this works as I have instances where I do this. But I don't think this was your question. Sorry, but I don't properly understand what you want to do. Why are you using the addOutput command?
BrainstoneX wrote:
Inside of instances you don't need to call the target entities prefix-targetname, just targetname. I am 100% this works as I have instances where I do this.
Yeah, you are right. The "Target Entity Name" does work as it should.
BrainstoneX wrote:
Sorry, but I don't properly understand what you want to do. Why are you using the addOutput command?
AddOutput OnTrigger::Disable::0:1
At this point the gets not changed. ![]()
(Valve does this with the box dropper instances.)
The only limitation is that you can't have multiple copies of the same instance in one map, since the @names will conflict.
HMW wrote:
If you make sure that the target object's starts with an @ character, it will not get a name fix-up and it should work with AddOutput.
(Valve does this with the box dropper instances.)The only limitation is that you can't have multiple copies of the same instance in one map, since the @names will conflict.
yep, I know. But I have at least 8 of these instances at my map. 
BrainstoneX wrote:
Sorry, but I don't properly understand what you want to do. Why are you using the addOutput command?
Could you do something like?
Trigger 1: OnTrigger <targetname> FireUser4
<targetname> OnUser4 -> relay_2, FireUser4
Relay 2 OnUser4, !activator, disable?
lpfreaky90 wrote:
Trigger 1: OnTrigger FireUser4
OnUser4 -> relay_2, FireUser4
Relay 2 OnUser4, !activator, disable?
I solved it nearly like this example, but I still have the problem with the AddOutput command.
What I have learned so far:
- Hammer does not change the "&i" in "Parameter"-Field
- Hammer does not add the Fixup Name of an instance in "Parameter"-Field
![]()
I was trying to use the AddOutput command, because it would have been much easier,
when Hammer would change the "&i" and would add the Fixup-Name of the instance in "Parameter"-Field.
It's about 500% more work for me now, just because it does not work properly. ![]()
lpfreaky90 wrote:
We still don't know why you need the AddOutput command for
- Let's say I have X rooms and each of them has 8 'linked_portal_door' entities.
- At Map Spawn I want each 'linked_portal_door' to get randomly connected to any other portal on the map
- but it is not allowed to take any portal in the same room.
So I could create 1 'logic_case' where I place all the connections, or I would place it 1 time in each room,
with AddOutput - which would be less work, because it would choose the correct link much easier.
But it does not work as I was planning it, because the Parameter Field does not change the names.
So I am forced to write down all possible links - much work. 
Can you see (or see through) multiple linked passages at the same time? Because if there are too many linked_portal_door entities visible simultaneously, you'll get display glitches.
If you haven't done so yet, I'd recommend that you make a quick test setup first and see if it actually works in-game, before worrying about the randomisation part.
(Just copy-paste some rooms in a test map and set the portal links manually.)