Editing Instances and Using Timers

Avatar
RubbishyUsername
167 Posts
Posted Jul 21, 2011
Two things:
When I was stumbling along, making my first map I needed to edit an instance (the cube dropper) so that the background was the right texture to fit with the map. However, I accidentally replaced the original instead of saving it as something new. Is this going to come back and haunt me? What can I do to return it to its previous state? I've heard that you should never edit instances, but...

Secondly, I'm struggling with a timer on one of my maps. What I want to happen is that when you depress and unpress a button, the indicator lights light up and the timer begins and you have to press the other button within that time to activate a funnel, but I'm failing miserably. Can some one point me in the direction of a clear non-technical tutorial that can explain it for me? Thanks.

Incidentally, what's the difference between the wall and floor indicator light textures?

RU.

Advertisement
Registered users don’t see ads! Register now!
Avatar
WinstonSmith
940 Posts
Posted Jul 21, 2011
Replied 4 hours later
It won't really come back to haunt you except in maps you're still working on. You can always re-edit it and change the texture back.

Second: do you want the funnel to stay on forever after the two buttons are pressed? Or do you want the funnel only to stay on while both buttons are depressed and haven't yet reset?

And finally, there's absolutely no difference in Portal 2. It's a carry-over from Portal 1 where the indicator strips had different colored backgrounds.

Avatar
RubbishyUsername
167 Posts
Posted Jul 22, 2011
Replied 9 hours later

Thanks. What I want to happen is for the funnel to stay on (or in this case, switch direction) for ever. So:

  • Press button 1 or 2
  • Timer starts when button is unpressed
  • Press other button
  • Timer stops
  • Funnel changes direction for an indefinate time.
Avatar
Rubrica
305 Posts
Posted Jul 22, 2011
Replied 26 minutes later
Wouldn't it make more sense for the button to have a key value that says it's on a timer (EDIT: delay before reset, and you may or may not want to enable Prevent fast reset), then fire your output on OnPressed, and negate it on OnButtonReset? Anyway, if you do do it that way, which is the easier way, I believe, then add an output for the first button that says to add one to a math counter OnPressed, and OnButtonReset to subtract one from it. Then, add an output for the other button saying OnPressed, add pne, and OnButtonReset, sibtract one, but dont put this button on a timer. The math counter should have a max value of two, so add an output to it saying OnHitMax, SetValueTest 1 to a logic branch. Add no other outputs to the math counter. Then, on the logic branch, add an output saying OnTrue, and then whatever your funnel inputs will be.

Additionally, if you want the funnel to change direction every time you do this two-button manoeuvre, then just change the SetValueTest input to ToggleTest, and add an output to the logic branch saying OnFalse to change the direction from the OnTrue value.

I have no idea if this is the most streamlined way of doing it (it probably isn't) and it's a lot simpler than I make it sound, but this should work.

Avatar
RubbishyUsername
167 Posts
Posted Jul 22, 2011
Replied 28 minutes later
I have been mapping for about a week. I understood none of what you just said.

:notwant:

I could upload the map in WIP as I have done it so far if you wanted to show me what you meant.

Avatar
Rubrica
305 Posts
Posted Jul 22, 2011
Replied 14 minutes later
Tell you what, I'll just create a test map for you myself, that way we only have to send one file about the place. I'll have it done in a little bit. :smile: Sorry, I do have a problem with making things overly complicated.
Avatar
Rubrica
305 Posts
Posted Jul 23, 2011
Replied 1 day later
Er, sorry I took to long, I got distracted, and... well, it's in the description. Check the "ohter files" section. I'm not sure how to fix the indicator lights, sorry.
Avatar
Omnicoder
299 Posts
Posted Jul 23, 2011
Replied 1 hour later
There is one difference with indicator lights: you don't have to re-size them anymore.
Avatar
Rubrica
305 Posts
Posted Jul 23, 2011
Replied 31 minutes later
What do you mean? I was talking about a problem where if the user presses the timer button, then the normal button, the timer indicator lights stay on until the timer resets, when all the other indicator lights have gone blue.
Avatar
RubbishyUsername
167 Posts
Posted Jul 26, 2011
Replied 2 days later
Thanks Rubrica. It occured to me is that you could set up a reverse version of your button timer if you wanted the reverse to work as well so pressing either button would start a timer.
Avatar
Rubrica
305 Posts
Posted Jul 26, 2011
Replied 50 minutes later
Oh godmother I'm dumb. I just realised, did I even include the vmf in e zip? Your post just now reminded me, I get the feeling I only included the bsp... Oops. Sorry!
Avatar
RubbishyUsername
167 Posts
Posted Jul 27, 2011
Replied 23 hours later
Don't worry, I needed to get BSPSource anyway.

I've thought about it a bit more and I must need the following with preferences in this order (does it work like that?):

  • When Button Right is pressed, if Timer Left is on, turn on Indicator lights left and right and open door.
  • When Button Left is pressed, if Timer Right is on, turn on Indicator lights left and right and open door.
  • When Button Left is pressed, turn on Timer left and Indicator Lights left.
  • When Button Right is pressed, turn on Timer right and Indicator Lights right.
  • When Timer Left stops, turn off Indicator Lights left.
  • When Timer Right stops, turn off Indicator Lights right.

Could you work that into an example? Is this even possible?

Avatar
Rubrica
305 Posts
Posted Jul 27, 2011
Replied 12 minutes later
I probably could, but:
A. I'm too busy right now.
B. It's good for you to learn to do things yourself.
C. I'm lazy,
D. I'd probablymtake ages again.

Incidentally, how on Earth did my iPad manage to autocorrect god to godmother?

Avatar
RubbishyUsername
167 Posts
Posted Jul 27, 2011
Replied 8 minutes later
Sorry for being too demanding. Can you point me in the direction of a tutorial I can learn from?
Avatar
Rubrica
305 Posts
Posted Jul 27, 2011
Replied 25 minutes later
Oh no, not at all demanding, just that you should have a go. Anyway, I don't know of any tutorials, but using the OnButtonReset output on the buttons and math counters this should be fairly easy. Have a go, and if you can't figure it out, I'll whip up a demo.
Advertisement
Registered users don’t see ads! Register now!
Avatar
RubbishyUsername
167 Posts
Posted Jul 28, 2011
Replied 1 day later
Well I've had a go now, and I've learnt that I failed to specify that the buttons should be the floor button type. It also still doesn't make much sense to me. Is there any equivalent to just getting the timer to do the work, i.e. stand on button 1, timer 1 starts, timer 1 checks for hitting button 2, stops when timer runs out.

If you like Rubrica, I could put my level in the WIP section so you can see what I'm trying to do.

Thanks for giving up so much of your time to help me both on this problem and my orange portals query.

EDIT: OK, I'm a fool. It would be much simpler if I just put both buttons on timers and the door opens when both timers are active.

EDIT2: YES! I fixed my problem!