Dynamically change a prop skin?

Avatar
Whysopro?
154 Posts
Posted Jan 04, 2011
Hmmm....so I am makin' my map in Portal 2 style, and I have watched all the media videos like 4 times so far. One thing I noticed that I was missing was the cube changing colors.

As seen in this media video: http://www.thinkwithportals.com/media_03.html, the ring of the cube changes color from blue to orange when placed on a button. My question is if that's possible with current techniques?

I was thinking I could setup the template with 2 cubes parented, one regular and one companion, then toggle visibility somehow.

Advertisement
Registered users don’t see ads! Register now!
Avatar
King Of Sandvich
15 Posts
Posted Jan 04, 2011
Replied 1 hour later
As long as the 2 appearances you want to switch between are 2 skins of the same model (which they are for the standard portal storage/companion cube), you can just have the button output to "skin" of the physics prop when it it put on or taken off. Set the parameter to 1 for companion and 0 for regular.

I remember doing something something similar with a logic timer and a weighted sphere to make is light constantly pulsate.

Just keep in mind that this will work with cubes from box droppers but will happen to any cubes on the map with the same name, such as the next one in the dropper. You may be able to fix this by firing the button's output to !activator, instead of the cube's targetname.

Avatar
WinstonSmith
940 Posts
Posted Jan 04, 2011
Replied 1 hour later
I'm doing this with P:SI (just the bright green/purple lines). It is easy enough; like King of Sandvich said, I decompiled/recompiled the cube model so I have a completely different file now. It can be done very easily with a simple trigger and: OnStartTouch-->!activator-->Skin-->1 as well as OnEndTouch-->!activator-->Skin-->0. If I get around to it I'll post a video sometime.
Avatar
msleeper
4,136 Posts
Admin
Posted Jan 05, 2011
Replied 1 day later
I love how people assume that the most simple of effects require some sort of overly complicated setup.
Advertisement
Registered users don’t see ads! Register now!
Avatar
Paul
2 Posts
Posted Apr 21, 2011
Replied 3 months later

I made this kind of thing the other day, had to recompile the cube and button with a new skin though, which added ~60mb to the bsp when packed.

http://dl.dropbox.com/u/5324647/entitytest.rar

Pretty sure this one is not quite working properly, if you put the cube on the button and walk on and off the button the base will change color, that was just a wrong endtouch.