SteamVR

SteamVR

SteamVR Workshop
Customize your SteamVR experience by finding new backgrounds, 3D environments, controllers and base station models.
Learn More
Source 2 Trigger something to happen after something is done for a random number of times
I'm working on a SteamVR Environment. One of the things I'm trying to get to work is a mechanic where you have to put an object inside of a trigger for a random number of times, and then it will fire an output once you have done it however many times it randomly chose.

I'm also trying to implement a similar mechanic to this, where you would have to put an object inside of a trigger, and it will change the skin for that object after a period of time. However, there are multiple duplicates of this object, with the same name (It's a burger, and the mechanic is like a food-cooking mechanic), so wouldn't it just change the skin for all of the duplicate burger objects, too? How can I get around this, and have it work if there are multiple burger objects in the trigger at the same time? This might be impossible, but I don't know. Maybe there's some other way I can accomplish this that would be better / easier to do. If anyone has any ideas, please, let me know!

Thanks!
< >
Showing 1-15 of 31 comments
Rectus 13 26 Sep, 2020 @ 10:42am 
For handling multiple burgers, you might have to script it. Maybe as a script on the trigger that adds the burger to a list of burgers along with its starting time, and then periodiclly checks that list to see if they've been in long enough. You could also adjust the color on the burgers gradually.
Nolan the Fox 8 26 Sep, 2020 @ 12:40pm 
Yeah. I was thinking of doing something with renaming the entities, I think you can do that? But there would be a ton of issues that would probably arise from that, your idea sounds a lot better. I'll have to think of something. Is there a way to do it with Skins? I've already made a couple.
Rectus 13 26 Sep, 2020 @ 12:43pm 
Yeah, swapping skins works just as well.
Nolan the Fox 8 26 Sep, 2020 @ 12:46pm 
Ok.
Nolan the Fox 8 26 Sep, 2020 @ 12:48pm 
Also kind of unrelated, but I always seem to have issues when trying to use path_corners. Whatever I'm trying to move along the path will not follow the path corner, it'll just stop on it.
Nolan the Fox 8 26 Sep, 2020 @ 12:56pm 
And, also, with these path_corners, do you know what radius is for?
Rectus 13 26 Sep, 2020 @ 1:00pm 
Try using path_track instead.
Nolan the Fox 8 26 Sep, 2020 @ 1:05pm 
Ok.
Nolan the Fox 8 26 Sep, 2020 @ 1:16pm 
Yeah, that fixes it, now I have a (partially) working road system, thanks.
Nolan the Fox 8 26 Sep, 2020 @ 1:24pm 
Originally posted by Rectus:
Try using path_track instead.
I have a question, say that I wanted to make the choice of path random. I have intersections where the possible paths are left, straight, and right. Could I use a logic_random_output to switch between the standard and branch paths? More specifically, I think you can, but can you make it reusable, rather than having to make one for every intersection? Like, I've never used them before, but I'm wondering if you can use something like:
For whatever path_track it is, in outputs:
On Pass > logic_random_output > Trigger
And then in that logic_random_output, in outputs:
!caller > Enable Alternate Path
Would / could that work? I've never used !caller before.
Rectus 13 26 Sep, 2020 @ 1:27pm 
Sounds like it could work.
Nolan the Fox 8 26 Sep, 2020 @ 1:31pm 
Ok, I'll try it, thanks.
Nolan the Fox 8 26 Sep, 2020 @ 2:17pm 
Ok, I also just tested out what I'm trying to make my random number thing work with, I think it changed the amount you have to do it, but it doesn't reset, it seems.
Nolan the Fox 8 26 Sep, 2020 @ 2:27pm 
How would I reset it? Would I set the math_counter to 0? If so, I'm guessing it would be with SetValueNoFire. Actually, I'll just try that, for now.
Rectus 13 26 Sep, 2020 @ 2:30pm 
PickRandom to the logic_case again if you want to be random.
< >
Showing 1-15 of 31 comments
Per page: 1530 50