Please or Register to create posts and topics.

Working with Instances

PreviousPage 4 of 13Next
Interitus wrote:
I made my first instance today, just a simple test. I dont think you need to put in a func_instance, as stated in your wiki pages. The origin is the map origin 0,0,0. Or, if you want, you can place a "func_instance_origin" to be the pivot point. You can however, place instances inside your instances (yo dawg, I heard you like instances..), which would use func_instance.

Good catch. Would you mind updating that wiki article (if it hasn't been already)?

[Important Threads] Forum Rules | Welcome to the new Thinking With Portals
Please do not Private Message me for assistance. Post a thread if you have questions or concerns.
If you need to contact the staff privately, contact the Global Moderators via Discord.

What would cause the entrance elevator to ignore entities? No lights are working, nor is the elevator doing its thing. Not sure what i'm missing. Am I wrong to assume that instances are ready-to-go like prefabs would be?

Is it allowed to post useful instances on TWP?

Sure, upload them to the "Other Files" of the Portal 2 section in the Download Database.

If we get enough instances I might just make a new category for them.

[Important Threads] Forum Rules | Welcome to the new Thinking With Portals
Please do not Private Message me for assistance. Post a thread if you have questions or concerns.
If you need to contact the staff privately, contact the Global Moderators via Discord.

I've been reading a number of posts while building my first maps and running in to the fact that I'm getting the Potato gun instead of the regular Portal gun because of the default behaviour of the scripts. Could the same technique used to properly generate custom chamber signs be used to amend the transition script safely to set things like this properly?

Check out my Elevator example. I include a custom arrival_departure_transition_ents.vmf instance, which removes the potato gun (as well as handles a custom exit text).

[Important Threads] Forum Rules | Welcome to the new Thinking With Portals
Please do not Private Message me for assistance. Post a thread if you have questions or concerns.
If you need to contact the staff privately, contact the Global Moderators via Discord.

I have taken a look at that yes and it seems like a reasonable solution.

Idolon over at mAL wrote this up in a similar "Instance Help" thread; with his permission I'm reposting it here, because it's the single thing that actually made me understand how to interact with instances in a map.

Idolon wrote:
All you do is put a func_instance_io_proxy somewhere in the instance's .vmf. Now, lets say you want to be able to trigger a relay from outside of the instance. To do this, you would just create an output on the func_instance_io_proxy like so:

OUTPUT: OnProxyRelay
TARGET ENTITY: relay (or whatever your relay's name is, or for that matter, ANY ENTITY in your instance's .vmf that has a name)
TARGET INPUT: Trigger

Then, when you put an instance in your map, you would do this to trigger something in it:

OUTPUT: <whatever you need to use>
TARGET ENTITY: <func_instance's "[Fix]-up name" (this is a keyvalue in the func_instance entity in your map)>
TARGET INPUT: <find the correct input you want from this list. The list should contain all of the OnProxyRelays you set up in the func_instance_io_proxy in the instance .vmf>

The func_instance_io_proxy just serves as a link between the instance's .vmf and the map in which it is used, telling the func_instance which inputs can be fired for the map in which it is used.
If you need to add another available input to the instance, you can just click the Edit Instance button in the lower left corner of the Object Properties window.

Also, a word of warning: Valve's instances have ZERO documentation, so they are pretty hard to use.

Image
Now with 100% more inline comments!

:thumbup:

[Important Threads] Forum Rules | Welcome to the new Thinking With Portals
Please do not Private Message me for assistance. Post a thread if you have questions or concerns.
If you need to contact the staff privately, contact the Global Moderators via Discord.

I seem to have a problem with mine. On my desktop computer (where I normally do my mapping) I try to make instances and whatever I do they never work. On my laptop (which I only use for mapping in this case since it cannot actually run P2) the instances work fine but as soon as I transfer the map files over to my desktop to test the map the instances don;t work at all.......anyone got any fixes for this?

PreviousPage 4 of 13Next