items needed:
9 properties
5 triggers
1 player coordinate device
1 game overlay text (may use trigger but overlay is best for debugging it if any problems occur)
1 counter
1 game overlay button (may switch out firing methods if desired)
1 notification (optional but best for testing)
step one
lay out these 9 properties all player scoped and number based
place your first trigger next to the coordinate device with a delay of 0.01 and make it recieve on the channel the coordinate device broadcasts on then make a block in the trigger and set it to this also make sure the trigger broadcasts on a second channel called “[your channel name] 2”
place your game overlay/trigger and give it these blocks also make it activate on that channel I mentioned earlier (replace the subtraction sign with an addition sign)
make a trigger loop with the far right one activate and trigger on a channel named “fire” with a delay of your choosing this will be how fast the projectile moves then wire it to a counter counting the number of repetitions resetting when hitting the chosen max repetitions and disabling the trigger closest to it when it resets the counter will also update the “radius” property that has a default of 1 (can be 0 if desired)
this will be what determines how large your items hitbox will be targeting players will require different blocks for this of which I will include later
so make a trigger loop with a delay of 0.01 and make it start on the channel the coordinate device broadcasts on and give one trigger these blocks (bigger the number in the if block bigger the hitbox)
and you may use a notification to test it
and the optional game overlay will broadcast on “fire” when pressed
but can be switched to different firing mechanics
but for now map out your object’s locations using a game overlay and the og x and y properties and use that to compare for your distance formula
also side note this is not accurate enough like at all
I’ve been experimenting with desmos to try and fix this
I’m gonna be heading onto a couple math forums to try and find an answer cuz my brain broke (again) if you wanna give what I’m doing a try a link to the desmos project that correlates to this is in the posts below
also second side note I did not make this guide based off my help topic for likes and stuff (I’m not that stoobi) just thought it would be nice to unlock some possibilities for others
besides this’ll be helping me remember how to make it in my map :p (this also take like 5% memory)
Sure i’ll grab something from desmos and keep some of the visuals and tweak em
visuals are being stubborn ._. trying to add as much as I cant to make easy to look at
alright here’s a visual representation using desmos
let the a loop
and mess with the radius slider the t and p variables change the origin of the rotation the visuals yes are bad but they’re not needed for the system regardless
you could it’d just be more painful to make
if you want it to be good
but brain’s half burnt rn
if anything i would focus on improving this a bit more
as it still spams the hitbox >_< so yeah this is gonna recieve a bit more work in the future but im gonna let my toaster brain cooldown
when the projectile comes into contact with something the trigger loop counts it multiple times like once it’s in the hitbox it spams until it resets or gets out of range
ah here we go
I figured out a while ago that it dosent go by terrain tiles but by something else that made it hard for me to measure by tiles so I go by repetitions per second which is 0.04 in this case with a maximum of 25 before the radius resets to one so basically it has a 1 second speed
So 25 tiles per second and say the gim is 1 tiles squared. This means that a 0.4 second i-frame or a bit longer (the gim might not be 1 tile, this could be checked by grid lock and lasers) would be needed for hit detection to actually register 1 hit only.