Great timing to teach us intimidating tech that we'll need in the future! Looking forward to Part 2! May I add two notes for your next video? 1) Nil'ing your index at full rotation has the major downside that targets close to rotation end will be visible very briefly. I would suggest to bind the index to the rotation. This allowes you to clear the index at access first, then write any accuired target. (downside may be, as you saw in this video, that there might me a de-sync in the rotation number when the if >= 0.5 sets a new default after first pass - that needs to be addressed) 2) Add Alpha Values to the dots, that decay by tick. Looks super cool! You can set the start value to a twin-array (same index x2) and reduce it every tick by 1.
@leemiles39958 ай бұрын
please make an updated version of this tutorial, it was heartbreaking to get halfway through this and then realise that the radar part is different to mine.
@Wolfpack6117 ай бұрын
Hey, just want to let you know, the starter boat (can be found in presets) still had the old radar, so just take it off of it (control+left click) I dont know if the tutorial still works for it or anything because I havent tried it
@darkangelgaming77876 ай бұрын
yea. i saw that too. they changed the radar basic to have a radar number out, input in and composite out. i have no idea how its going to read from the composite out since im so new to this game. though, did notice it has 8 channels on it i think.
@leemiles39956 ай бұрын
@@darkangelgaming7787 you can read from the composite out using a 'composite read (number/on&off)' in your microcontroller, then you can select which channel you want to read from. the channels range from 1-32, and are basically 32 number, and on/off inputs squeezed into one. you can tell what channels mean what by hovering over the composite logic node on the radar. Hope this helps...
@WalterBlack-meth2 ай бұрын
i have sad news if you dont now this but mrnjersey stopped
@dnt_alert58063 жыл бұрын
Yay a tutorial on stuff I don’t understand
@Nickgam_er Жыл бұрын
Do you have stormworks on steam?
@matthewjansen1363 жыл бұрын
can we get an updated tutorial for the new radars?
@fourwindbadger80662 жыл бұрын
would love that, i cant get this to work anymore :(
@VtolVRClips2 жыл бұрын
@@fourwindbadger8066 same
@Izz4cc2 жыл бұрын
@@VtolVRClips yeah i added a comment here few mins ago. You can try it if you still have issues
@Izz4cc2 жыл бұрын
@@VtolVRClips forgot to mention The radars can now detect upto 8 targets within its field of view. So the first detected target will have its distance value in channel 1 You can read that channel to find the distance
@TheCaptainMoo2 жыл бұрын
@@Izz4cc quite interesting izzac :D
@AF50Gaming3 жыл бұрын
This really helps as I was building a plane for the weapons dlc
@tulvatjoet55333 жыл бұрын
Great video, I would really appreciate more Lua tutorials. Keep up the good work
@icypandoragames57642 жыл бұрын
I had to take a coding class beforehand to understand. WORTH IT
@EldarKhaitov3 жыл бұрын
Would you be able to make a tutorial on composite radars? I believe I have an issue though I do understand Lua and composite data
@ebojager3 жыл бұрын
How come my radar doesnt have the same connections as yours? Mine only has Active and Rotation
@reiduh99473 жыл бұрын
there are new radars
@anusflotze66463 жыл бұрын
awesome tutorial as always. this came in handy for my submersible's sonar!
@EpicSpeed52228 ай бұрын
Great tutorial and thanks for explaining everything on the way however is it possible you can made an updated one for the new radar systems as that would be very helpful?
@pheocalo40732 жыл бұрын
Sir i tried it.. and my target didnt pop up on the screen. I follow the code of your lua. Still no red dot
@redpug50423 жыл бұрын
not bad, i use a similar system, however, each table value stores a distance, rotation and tick counter. every tick, the counter for all points is increased, when that tick count is as long as one rotation, it gets deleted. I also prefer to draw rectangles with a width and height of 1 because it's less laggy than circles, and it looks basically the same.
@MentalillnessPerson11 күн бұрын
my god, what have i buy, this is complete 10/10 masterpiece games, never I though it going to be this difficult to set up a radar in stormworks
@MentalillnessPerson11 күн бұрын
holy shit, I use chatGPT and it actually working so well... I am so shock
@Megalodon345612 жыл бұрын
I watched this video 3 times and made sure everything was copied down besides a few number changes because I built it on a 3x3 monitor but the sonar still doesn't pick anything up, i aslo made a 2x2 monitor like the one in the video but it still didn't pick anything up, please help
@Jackthewack75 ай бұрын
Outdated sadly😭
@MRE510 Жыл бұрын
Good tutorial but i am stuck with the problem. I have no such thing called "radar yaw" or any of that i only have "radar rotation" number as output and "radar data" as composite as input
@Glonkusmonkus Жыл бұрын
They updated the radars so this tutorial is now slightly outdated. I'd suggest a new tutorial but I haven't found one yet.
@galaxysgreatestchannel2 жыл бұрын
can anyone help me it says that there is a tick failure and the index table is NaN this only happens when the sonar is turned on
@_Austria3 жыл бұрын
My radar does not seem to have so many „connection points“. Why is that? Am I in a newer Version?
@trueexposure74873 жыл бұрын
Same, trying to figure that out
@awhahoo2 жыл бұрын
Its outdated for the new radar, id advise trying to find a different tutorial
@Astronut1282 жыл бұрын
I don't have any experience with LUA. Can you have one of the values in the table count down every second and when it hits 0 the line is deleted?
@Der_Yoloist3 жыл бұрын
9:00 couldnt u just switch cos with sin?
@alvelycken78933 жыл бұрын
the three pays- apple pay, google pay and 2:45
@awhahoo3 жыл бұрын
Take my like
@Spartan-oq1yw11 ай бұрын
hey so im about 2 years too late and the radars have changed to where its only a composite output im still trying to figure it out but could you by chance make a video on an up to date version of this?
@FluffyYukihyo3 жыл бұрын
has something changes since 2 months because nothing like this shows on the radar now, with the yaw component connect etc.
@darkfangulas3 жыл бұрын
im screwed when the Weapons come out because i cant work any kind of guided missiles
@oliverfarley75523 жыл бұрын
The tutorial that went missing or just deleted
@Callum09293 жыл бұрын
it got privated fore some reason
@murasamest18453 жыл бұрын
because it was outdated
@Sbotkin3 жыл бұрын
You could just add the table reset code to the angle reset if.
@Callum09293 жыл бұрын
I know i thank'd you on the first up-load but thanks again
@TheFrog5853 жыл бұрын
The new radar has only 2 funtions, radar on/off and rotations! This is where i can't go futher. rotations, on the radar, is a output. In the microcontroller we need to make a output Radar Yaw but i can not connect it on de radar. And now comes a strange thing: the radar is rotating on screen, but is not conected with the output Radar Yaw. Please can you help me and explain why and how i can go futher?
@Izz4cc2 жыл бұрын
I think all the other stuff is composite now?
@Dragon543210 ай бұрын
I can’t get it to pick up a target and I’ve been working on it for five hours😢😢😢 also this is my second video
@Dragon543210 ай бұрын
It’s marking me hate my life
@headlessstew10 ай бұрын
@@Dragon5432Hey no worries! Turns out this video is outdated as of maybe a year ago? I'm still learning how it all works too, and haven't found an up to date video yet. There is a Steam guide named 'Creating a Simple Marine Radar" which looks promising, but I'll reply back here if I find a tutorial/guide that works for the current stuff
@icfr0st78 Жыл бұрын
I followed this almost to the letter (adjusted numbers to fit the screen) and now I'm stuck halfway through. My Lua says "10: syntax error near '+'" and I have no idea what's going on. Up until this point it was going to plan. It started right as we were programming it to have the line spin Edit: I found my problem. Had an extra + instead of =
@gamershark22123 жыл бұрын
Hopefully the weapons dlc will come out on maybe Friday, Also keep up the good work MrNJersey.
@MrNJersey3 жыл бұрын
Devs always announce the major updates weeks in advance so doubt it would be this week Friday
@dnastudios98363 жыл бұрын
I hope it is going to be announced this Friday.
@dcvendex41663 жыл бұрын
That would be awesome. How did you figure out it might be this Friday?
@gamershark22123 жыл бұрын
@@dcvendex4166 usually when I go to the announcements on the stromworks discord, it seems like Majority of the updates are on Friday but I could be wrong.
@gamershark22123 жыл бұрын
@@dnastudios9836 same
@Izz4cc2 жыл бұрын
For anyone confused with the code which does the rotation of the line I found a way basically x1 = w/2+h/2* math.cos(((rotation*1.57)*4)-1.57) y1 = h/2+h/2* math.sin(((rotation*1.57)*4)-1.57) where rotation is the value of the radar's rotation node and w and h are the screen's width and height respectively explanation : [multiplying rotation with 1.57 turns the rotation to radians] [multiplying it by 4 makes sure that it turns 6.28 radians] [subtracting 1.57 makes sure that the line starts from the top of the screen] In my opinion, I think this is the easier way
@Izz4cc2 жыл бұрын
Here's my full code :- w1=0 h1=0 -- Tick function that will be executed every logic tick function onTick() rotation = input.getNumber(30) -- I wrote the rotation value into channel 30 because 1-28 channels are being used for radar and then 31,32 are the inputX and inputY for touchscreen x1 = w1/2+h1/2* math.cos(((rotation*1.57)*4)-1.57) y1 = h1/2+h1/2* math.sin(((rotation*1.57)*4)-1.57) end -- Draw function that will be executed when this script renders to a screen function onDraw() w = screen.getWidth() -- Get the screen's width and height h = screen.getHeight() w1=w h1=h --Makes width and height accessible by the onTick function screen.setColor(0,255,0) screen.drawCircle(w/2,h/2,h/2) screen.setColor(0,200,0,125) screen.drawLine(w/2,h/2,x1,y1) end
@Bendigo12 жыл бұрын
Thank you.
@qboy98243 жыл бұрын
Nice vid!
@dnt_alert58063 жыл бұрын
How did you watch a 31 minute video in 5 minutes lol
@qboy98243 жыл бұрын
@@dnt_alert5806 magic.....
@thelightbrigadef41723 жыл бұрын
I'm really curious how to make LUA works for property selection of microcontroller because they are not even attached to anything. Therefore, it used LUA to make it works. For example, adjust the AFR modular engines without connection to any logic. But it used LUA.
@redpug50423 жыл бұрын
you use property.getNumber("name") or property.getText("name") in the lua script, just as you would use input.getNumber(channel)
@strecozel2 жыл бұрын
25:14 i am stuck here... radar did not showing any targets
@Jackthewack75 ай бұрын
The title is out dated😢 spent an hour his inputs and outputs where different than mine😭
@Domenic_the_nerd963 ай бұрын
@@Jackthewack7same here, I guess I’ll have to find another tutorial
@random_potato2549Ай бұрын
@@Domenic_the_nerd96 he uploaded the creation from this video on the workshop, and it's updated there
@Miko-yi5zw Жыл бұрын
When i do it it ses that its expected to end at the line that its ment to
@Watermeloncat99992 жыл бұрын
on the drawline part how did he like link those words on the you know the script
@darklxr45973 жыл бұрын
Finally he made another one. His older video does not work
@Wolfpack611 Жыл бұрын
What do I do now that the radar you use is now a sonar?
@serg_sel75262 жыл бұрын
After an year of doing nothing, I've detected that Jersey don't know lua as much as we all here. He don't know about local variables and it is used to get rid of x1, x2, x3, x4, ..., xn in code. For example, x3 can be local x to get rid of 3.
@meidk27632 жыл бұрын
can someone pls tell me why my line has an error?i do everything correct,i double checked everything,it just doesnt work
@mikeh20062 жыл бұрын
Upload it to workshop and let me know what it's called
@xavii.MataaaAbuelas2 жыл бұрын
make sure that you writed cos and sin right
@BenDixon-w7x9 күн бұрын
for anybody paniking at 15:03😱😱😮 don't worre the thing will still spin without connecting to the radar block💪💪💪
@BigBrain_Gaming_Official2 жыл бұрын
There do not a cure a dot on my screen why?
@roxstar50883 жыл бұрын
I keep getting the error: Tick_Failure 33: Table index is NaN Stop 0x00000000
@kriln0_02 жыл бұрын
For anyone wondering how to fix this Just make a composite input connect the composite info from your radar to your micro controller and then inside the micro controller just connect the Composite node with the lua script node
@LordKosmos2 жыл бұрын
Will try just that. Have several workshop vehicles with that radar and they no longer work due to the update. This sounds like an easy fix.
@new_risk83412 жыл бұрын
@@LordKosmos did it work?
@LordKosmos2 жыл бұрын
@@new_risk8341 ah, did not test it, I was able to just fix the old radar by changing the search radius (the angles) and it worked again.
@bv17553 жыл бұрын
So fancy
@AlphaGametauri Жыл бұрын
There an updated tutorial?
@gargamel71272 жыл бұрын
in the tables how is x2 a index? y2 is a value yeah but isnt x2 also a value? and why "for x2, y2 in pairs" what does that even mean?!
@joshcooper-marsh54023 жыл бұрын
We need an updated version 😞
@rebeca27373 жыл бұрын
my dots wont stay.. my table is the same but they just dont stick..
@jakewalton95213 жыл бұрын
this is great as ngl i have lost faith in radars recently as they seem odd
@charles0423 Жыл бұрын
Does this work with new radar?
@Splinkle3 жыл бұрын
im not sure if its because this video is 5 months old or if i did something wrong but i cant connect radar yaw to the radar
@blakebotha85202 жыл бұрын
is it an input???
@Highlandcpw4life7 ай бұрын
the new update causes a tick error Edit: Nvm i put con instead of cos edit: when i tried to put y2 and x2 in table it gave me a syntax error for the equals sign if that is what is i can't tell my quality isn't super good
@crixt40162 жыл бұрын
They change the radar, now, the radar does not recive imput, it only output angle of the dome, and the target data is given via composite, up to 8 targets, im not a programer, but so far manage to change the display so the line move with the radar angle (just ignoring the speed and angle part, and change the "a" for put an imput line in the "radarA" line.
@EnderMalcolm3 жыл бұрын
I have no idea why, but my Stormworks must be messed up. I followed the tutorial precisely, and my radar is pointed in a really weird direction, only detects one thing, and it's not lined up at all. It also doesn't show the distance properly, so not a clue why it's gone wrong.
@GoogleUser--jk1db3 жыл бұрын
This is Part 1. There should be more stuff to do.
@ineednochannelyoutube53843 жыл бұрын
You probably have your radar placed facing improperly. You need to add the initial phase difference to the facing value passed into the script.
@MineCraft-xp4jv2 жыл бұрын
can you make a tutorial about switching Lua? it would be good. plspls.
@potatofuryy3 жыл бұрын
Can the radar be inside of the vehicle?
@MrNJersey3 жыл бұрын
Yes
@tynankavanaugh84512 жыл бұрын
whyyyy do indexes ever start at 1
@clairescott89022 жыл бұрын
what is math cos & haths sin?
@Bendigo12 жыл бұрын
Trigonometry to get the position and angle of the line.
@alexandrias.21102 жыл бұрын
My monitor is not turning on
@mikeh200615 күн бұрын
You can take the radar off the starter boat as the new one won't work.
@Dimwerdp3 жыл бұрын
I want that staff on russian; its too informal, to be without normal English subtitles at least
@chrisklix29353 жыл бұрын
looks like this needs an update again. now that the new dlc has arrived
@Rodfather722 жыл бұрын
Alright, I’m done. It’s obvious this game is not for me 😂
@Dinger_JC3 жыл бұрын
Cool fireo ) (video)
@trixen6347 Жыл бұрын
New radars dont work it doesnt have radar yaw it has current rotation and it is output number
@cdeshaw19862 жыл бұрын
Loved this game up till this point. Taking calculators out to play a game is where I draw the line. If the combat was great it would be worth the hours these creations take, but the combat is horrendous at best. Love the idea, but they should of stuck with Search and Rescue and made a new game for fighting in my opinion! I think Radar should be a standard item, not something we have to literally create with code. Imagine having to code the defibrillator? I think this game would achieve a lot more success by making items like Radar automatically function by just hooking it to a screen. I cant tell you how bad I want to make military equipment to fight the AI, but realizing how poor the combat is, I can not dedicate the time to learn all this. If radar is this hard, how hard is targeting? Also the creations I have used with Radar and such, seem very touch and go. More do not work than do. I'm not trying to just be a downer here, It is just that all the weapons DLC are useless to me without radar and targeting systems, and I can not be the only one lacking the patience to learn that much for the sloppy combat as the reward. I learned to make a nuclear reactor function in this game, but the deeper logic stuff I am absolutely lost, and math is my best subject! It does not help that there is like no tutorial for the logic in the game. Thank gosh for you and your channel, you have taught me far more than the game is capable. Now to watch this video for the 5th time to see what I am just not understanding here!
@thelogan46412 жыл бұрын
For many of these more complex components, people create them and upload them to the workshop, you can just grab them from there and then plug and play them into your creations
@mikeh20062 жыл бұрын
You could make a simple radar which will still ping locations and distances without using lua. My weaponry is auto loading but I like aiming manually and having the radar as a guide.
@Granci_ Жыл бұрын
not working!!
@caseym62723 жыл бұрын
Annnnnd it looks like they got rid of the yaw position..
@rny4203 жыл бұрын
Nice tutorial! Your code *communism music starts playing* I mean our code is looking good.
@pheocalo40732 жыл бұрын
i still cant do it.. like how to find a target.. i copy all your codes in the lua.. awts the basic items needed? huuhuhuh
@awhahoo2 жыл бұрын
This tutorial is outdated at least with the radars you can place
@A_random_person872 жыл бұрын
eh why not dowload a lua scirpt form the workshop easy as that :D
@bryonkornder47592 жыл бұрын
Jeez slow down for some of us non rocket scientists. I have to pause and replay this a bunch. And then try to save to find it didn't save my Lua script. Neato.
@Original_Moi2 жыл бұрын
28:42
@nichomarlo20002 жыл бұрын
i need help
@mikeh20062 жыл бұрын
Workshop >>
@philippeguerin93733 жыл бұрын
Alert Mr!!!!! this vid is outdated!! New radars and new updates already X_x
@Watermeloncat99992 жыл бұрын
i saw now
@serg_sel75263 жыл бұрын
I have a map with radar.
@clairescott89022 жыл бұрын
& maths sin?
@aaproductions88802 жыл бұрын
Does not work
@mikeh20062 жыл бұрын
You'll have gone wrong somewhere. Easily done.
@murasamest18453 жыл бұрын
already outdated because of how the weapons dlc changed radars
@OutletVibes3 жыл бұрын
Was wondering what I was fucking up here. I thought for sure I missed something and went back to rewatch it for a 3rd time
@murasamest18453 жыл бұрын
@@OutletVibes yeah, the second i noticed the radar couldnt receive an angle i remembered. In the radar update video he said it was easy to turn composite into that screen but i hope he makes another video on it
@freddo56773 жыл бұрын
you can still do it with the new radars
@haydenrothrock71513 жыл бұрын
@@freddo5677 How, mine doesn't work
@Seeker_9033 жыл бұрын
@@freddo5677 how
@title27792 жыл бұрын
Consider removing or renaming these outdated videos so people don't waste their time.
@MrNJersey2 жыл бұрын
They work fine, nothing different
@title27792 жыл бұрын
@@MrNJersey Its all deprecated radars on the workshop, I'm horrible at math and your radar doesn't work on the workshop side by side with others. I'm gonna need that new radar tutorial asap. thank you.
@kaseypelyak47827 күн бұрын
out dated tutorial, only the first half of it is useful. 👎
@ghettodexter2 жыл бұрын
at 24:38 can YOU PLEASE stop that? "guys, justaquirquona" You have a horrible habit of trying to rush sentences especially your outro luckily you didnt do the outro like that this time. But its horribly cringey... "ok guys... if you like the ida m'sure you mash that like butondont orget tinkatha litil bell icon annnnd I'll see you in the next video"
@codylawson71752 жыл бұрын
Then don't watch his videos... The entire world isn't going to just stop for you.
@prestonkeightley47003 жыл бұрын
First
@nonnodacciaio7043 жыл бұрын
Shut up
@prestonkeightley47003 жыл бұрын
@@nonnodacciaio704 lmao okay, someone's mad
@nonnodacciaio7043 жыл бұрын
@@prestonkeightley4700 nah it's just kinda cringe that people still write first on KZbin in 2021
@prestonkeightley47003 жыл бұрын
@@nonnodacciaio704 pretty sure that saying first originated in 2020-2021, so yea??? Besides, if you think something is cringe, you dont need to tell someone it is, then you just look like someone who needs attention desperately
@nonnodacciaio7043 жыл бұрын
@@prestonkeightley4700 lmao dude how old are you? "First" comments are as old as KZbin