Working with Instances
Mr. Happy wrote:
reepblue wrote:I'm planning on making a how to/info post on my blog about instancing communication with pictures and junk. If I get the time tomorrow, I will work on it.
Are you sure about this?
I wish to do so, I just don't have the time. I got started on it though, so at least I did something. 
OnStartTouch
target entities: Crusher1-crusher_in_relay
via this input: Trigger
Crusher1 being the fix-up name
For Target entities, I've tried Crusher1 , Crusher1-crusher_in_relay , Crusher1-proxy
The instance doesnt have any replaceable parameters.
I mean, there are places where in-triggers are called via parameter variables replacements (logic_relay containing a $variable to replace), with absolutely no io_proxy, while they could've been using it.
To be honest, I've been having a hard time making instances/gameplay/floor_catwalk_128x256.vmf work, and I'd be frustrated to know if this is actually a legacy instance.
Other complexier instances like the multiple cube dropper (instances/gameplay/cube_dropper_multiple_normal.vmf) were butter to use compared to this. Except the fact that I couldn't find how to make a reflective cube dropper I had to duplicate this instance to change one tiny thing in the instance.
There's a good tutorial over on that other wiki.
http://wiki.p2mods.com/index.php?title=Instances
I was going to copy it over to the vdc but don't want two tutorials on there but I also
don't want to overwrite the one already there.
Hurricaaane wrote:
To be honest, I've been having a hard time making instances/gameplay/floor_catwalk_128x256.vmf work, and I'd be frustrated to know if this is actually a legacy instance.
Thats the one I got working in my map!
I made the value for $trigger_to_close_catwalk "close" and $trigger_to_open_catwalk "open", named the instance "Panel1"
Then directly on a prop_floor_button, set the output OnPressed Panel1-close Trigger for it to raise up
and same thing for Panel1-open to get it lower down.
With crusher_ceiling_01, it has no variables to replace, so I'm not sure what to do.
EDIT: Ok I got it working! Took at msleeper's instance examples and got it working. just gotta modify the instance now so its a quick crushing rather than slowly moving down.
I noticed in yours the end level text was static. You had a variable for changing it but you forgot to put the variable in the end level game text entity.
In mine I expanded on what you did and made the opening title, subtitle, and end text editable. I also added 3 boolean options to disable any of the 3 texts individually.
I hope you and others find this useful:
http://forums.thinking.withportals.com/downloads.php?view=detail&df_id=466
Let me know if I should make a new thread for this.
animerunt wrote:
I hope you dont mind, but I liked the tweaks you made to the transitions instance, so I made my own.I noticed in yours the end level text was static. You had a variable for changing it but you forgot to put the variable in the end level game text entity.
In mine I expanded on what you did and made the opening title, subtitle, and end text editable. I also added 3 boolean options to disable any of the 3 texts individually.
I hope you and others find this useful:
http://forums.thinking.withportals.com/downloads.php?view=detail&df_id=466Let me know if I should make a new thread for this.
Awesome! I think I was too worried about getting it released instead of fixing up the variables. I also didn't really understand how the variables worked at the time.
No need to make a new thread; uploading a file automatically creates the thread for you. Nice release!
msleeper wrote:
animerunt wrote:I hope you dont mind, but I liked the tweaks you made to the transitions instance, so I made my own.
I noticed in yours the end level text was static. You had a variable for changing it but you forgot to put the variable in the end level game text entity.
In mine I expanded on what you did and made the opening title, subtitle, and end text editable. I also added 3 boolean options to disable any of the 3 texts individually.
I hope you and others find this useful:
http://forums.thinking.withportals.com/downloads.php?view=detail&df_id=466Let me know if I should make a new thread for this.
Awesome! I think I was too worried about getting it released instead of fixing up the variables. I also didn't really understand how the variables worked at the time.
No need to make a new thread; uploading a file automatically creates the thread for you. Nice release!
Awesome, thanks!
Incoming shameless self promotion.
If you get time you should check out my first map too. http://forums.thinking.withportals.com/downloads.php?view=detail&df_id=467
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)?
If we get enough instances I might just make a new category for them.
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: TriggerThen, when you put an instance in your map, you would do this to trigger something in it:
OUTPUT:
TARGET ENTITY:
TARGET INPUT: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.