instance and AddOutput targetname

Avatar
PortalCombat
306 Posts
Posted Dec 01, 2011
Hey guys.

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?

Advertisement
Registered users don’t see ads! Register now!
Avatar
Brainstone
401 Posts
Posted Dec 01, 2011
Replied 1 hour later

To send inputs to instances there are two ways:
1. My Output named: OnTrigger
Target entity: instanceFixUpName-EntityInsideInstnaceName
Input: TheInputYouWant

  1. read in the wiki how to create your instance together with a func_instance_io_proxy
Avatar
PortalCombat
306 Posts
Posted Dec 01, 2011
Replied 57 minutes later

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.
Avatar
Brainstone
401 Posts
Posted Dec 01, 2011
Replied 19 minutes later
Ah, ok.
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?
Avatar
PortalCombat
306 Posts
Posted Dec 01, 2011
Replied 13 minutes later

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. :thumbdown:

Avatar
HMW
806 Posts
Posted Dec 02, 2011
Replied 18 hours later
If you make sure that the target object's <targetname> 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.

Avatar
PortalCombat
306 Posts
Posted Dec 02, 2011
Replied 2 hours later

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. :sad:

Avatar
ChickenMobile
2,460 Posts
Posted Dec 02, 2011
Replied 8 hours later

BrainstoneX wrote:
Sorry, but I don't properly understand what you want to do. Why are you using the addOutput command?

Avatar
Lpfreaky90
2,842 Posts
Posted Dec 02, 2011
Replied 18 minutes later
Could you be a bit more specific about what has to happen?

Could you do something like?
Trigger 1: OnTrigger <targetname> FireUser4
<targetname> OnUser4 -> relay_2, FireUser4
Relay 2 OnUser4, !activator, disable?

Avatar
PortalCombat
306 Posts
Posted Dec 02, 2011
Replied 25 minutes later

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

:thumbdown:

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. :thumbdown:

Avatar
Lpfreaky90
2,842 Posts
Posted Dec 02, 2011
Replied 2 minutes later
We still don't know why you need the AddOutput command for :wink:
Avatar
PortalCombat
306 Posts
Posted Dec 02, 2011
Replied 7 minutes later

lpfreaky90 wrote:
We still don't know why you need the AddOutput command for :wink:

  • 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. :thumbdown:
So I am forced to write down all possible links - much work. :sad:

Advertisement
Registered users don’t see ads! Register now!
Avatar
HMW
806 Posts
Posted Dec 07, 2011
Replied 4 days later
That sounds like a very cool idea, but I have one concern regarding the 'linked_portal_door' entities themselves:

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.)