#How to run multiple ai when the system has 30hz for each?
1 messages · Page 1 of 1 (latest)
It's usually a bad idea to use For Each for anything like this. Anything where player authority comes into effect, it will usually kill the CPU or NET if you try to run it through one.
You almost always want to run your stuff off of the authority of that object.
Also from the problem you describe it sounds like it might just be something wrong with how you wired it, not necessarily from CPU or NET issues.
Here's what I have, I'll try to get a clearer picture later on, I don't think I have any each for chips
To get a clear picture you can take a photo in-game and go to Rec.net. Click share > download
Just in case, because this does happen, do you realise that you have an if chip stopping the execution? Or is that intentional?
So you're checking a raycast that i think goes from the object to the nearest player, and if it hits, the authority of that object will set transform it either to get closer to the player (but remain on the same Y level) if it hits, or to go in the direction of any surface normal blocking its view from the player if it doesn't.
Is that right?
Yes Im pretty sure
Yeah for now to control ai off/on
Oh yeah for sure, just that this was a mobile pic, but I'll get on PC tmrrw morning and get a better pic
And one more thing, I don't think I changed much from the original circuits I made from last year (I came back to this project after a year), but back then I was able to run 40 ai no problem with the 30hz. For the revised one I used functions. But I guess it'll be clearer once I get the pic tmrrw
@vapid dagger
firstly, update all circuits that are currently depreciated. Secondly, when it comes to using multiple ai, learn how to use a gate chip. i cant discuss it rn because im busy hitting up all the other issues, but @ me if you have any other problems
Does the logging tab show you any errors when you try to activate it? There may also just be something plugged in wrong but i can't quite tell with this image quality, yeah 😅
Unless the image itself is old i don't see any deprecated chips
okay my bad, that pic was from the old circuits, for the new circuits with function heres a clearer pic, of the function, and the chips outside of function. No depraciated chips.
heres the log error i get , but even when i do wire the 2 transforms to the out bus, only one of the ai works. The reason why i dont have it wired to outbus in the fiorst place was because it took too much unecessary cpu
Do you know about the log check feature? Click on one of the errors and it should take you to the circuit that's causing said errors.
We should be able to work from there.
yeah thats what i meant. The error messages go away if i wire the 2 transforms to the outbus, but i even then only 1 ai would run. I didnt want to wire it to the outbus uin the first place because it took unecessary cpu
pink lines represent the connections that would fix the error
this is the circuits im cloning for each ai, could it be because im cloning the function call for each ai?
That might be the case. However, I'm still not sure
Are you making multiple "rec room object get first with tag" chips for each instance of the function?
And are they all looking for a different tag?
oh my god, okay i absolutely forgot about retagging each of the rro get first with tag chips. I think that was the issue. Ill come back here after seeing what happens after fixing that
Don't worry it happens to us all sometimes,
yk i came here to answer a different question but to answer your
all other 30hz in a room will turn off if you ran a error or forget to optmize something
like for ex if you had 1 killer ai try to follow a player from a player variable which is set to who ever punched them and you reset the sever that variable becomes blank and the game spam runs the error or blank player which turns off all other 30 hz which breaks the game
you normally fix this by having the game check with the [IS VAILD] chip or [IF IS VAILD] and if it is false have the AI be turned off
look i can't tell you how to fix it without looking at it but i can give you tips
1 just look at the 1 active 30hz and see if it is running a error or [empty data] or data that would be an error in certain condisthions like if it launched all cubes with the tag "taco" but you could remove the tag "taco" from all cubes mid game
2 this one helps the first and bro it is REALLY helpful. if you look into the logging in your maker pen turn on timestamps and look at what messes up and when. if you click it once the error chip highlights if you double click you tp to it [do keep in mind if it is constantly making errors if will be hard to double click on the growing list of error]
3 turn of certain 30hz and see which ones disable the rest [this may not work for you because of the repeating AI and if one is buggy the rest most likey are gonna be buggy]
thanks lol, ill come back here to this message once i can find a circuiteer to actually finish the map. I moved on to ugc so i wont be working on the map anymore
alright still glad i can help
💯 appreciate it
Hello, Ik this is old but I was curious about what you said here
Why is it bad to use for each I mean isnt it the same as using 10 different 30hz?
When I make a non room authority player run an AI it causes visual bugs like the AI position and rotation getting unsynced which is why I let the Authority run it all even if his cpu and net will be high.
Maby its just rooms 2.0 tho.
Haha that's alright. The reasoning i was going for is that if the authority of any one of them ends up changing it could quickly overheat the NET usage.
Shooting an object makes you the authority of the object, so if they have any kind of hitbox for you to shoot it would change the authority to you and start to make the room authority (or whoever you have running the circuits) start to consume a bunch of NET
oh k
good thing set authority is a thing now
Oh i am so glad, we've been waiting for an authority setting chip to be out of beta for so many years now and then they just casually dropped Rec Room Object Take Authority and didn't even announce it anywhere. That's so many creations that couldn't be published/sold as inventions that now can be!
I'm still waiting on an invention permissions level between "Edit and Save" and "Use Only" that can be made to cost money though, i think it's a real missed opportunity from Rec Room all these years, it'd allow for us to make circuitboard inventions where players can download and use it for free, but if they want to further tweak what's inside or just look for the sake of learning, they can instead buy a paid version set to "Edit Only".
It's always been if your circuit costs money, people can't edit into circuitboards to mess with them more because paid inventions are locked to "Use Only", but then if you instead make your circuit free, people can just edit into it and copy your circuits to make out as their own, so you don't get the money or recognition!
They all should work, but instead of 30 you should run on Update
Make sure it's within a circuit board so you don't have many systems, you can just copy your monster with all the circuits inside.
I wish set authority was released, it's better imo but take authority helps too.
what
I thought set authority is in the game already
it is?
oh mb its on beta