Introduction!
Hello! many people when making Psuedo-Hitboxes go about it with a VERY memory consuming way, recently I made a theory on how you could do Psuedo Hitboxes, this guide is the way I went about implementing the theory, however you can do it in whatever way you feel you would like best. (you can see the theory here)
Materials
4 game overlays (optional) 2700 memory
8 triggers, 80 memory
1 trigger, 540 memory
1 lifecycle, 50 memory
1 player Coords, 3500 memory
Total Memory (includes optional overlays): 6870
Memory Percentage: 7%
The Guide itself
First place down a player coordinates device, and make it update properties called X and Y (both of these are player scoped and are number properties)
then make it have some block code like this
now we will need to make 4 more properties these are all player scope and are Text properties. below is a list of these properties
point1
point2
point3
point4
NOTE: THIS NEXT STEP IS OPTIONAL
next make a game overlay that’s content scope is player and it has some block code like this.
next go back to the X and Y properties and make them brodcast on “XY Changed” when the value changes. then duplicate the game overlay 3 times and make sure they all are in different locations on the screen, now change each ones block code to set the text to one of the remaining 3 point properties (each game overlay has a different point shown)
Optional step done, the rest of the guide is required
next place a trigger and make it brodcast and recieve on “Loop” and a trigger delay of “0.2” make it have this block code:
Explanation
OH BOY, this will be a difficult one, first we get the first 3 point properties and set those to the respective point variables, next we get the X from both point1 and point2, then we get the y from point 1 and point 3. and then we check to make sure that the X variable (which is set to a property we haven’t made yet) is greater or equal to pos1 x, (make sure to round the variables that correspond with the point’s X and Y, so we can actually do math operations like greater or less then on them). while also making sure its less than or equal to pos 2 x (rounded), then we do the same process but with the Y (also set to a property not made yet), pos 1 y, and the pos 3 y variables. if it didn’t meet the requirements for the X properties, we print false to the activity feed, if it did meet the standards for X but didn’t for Y, we do the same thing, If they meet both requirements then we print true the the activity feed. hopefully you could understand that mumbo jumbo I just typed up.
next place a game overlay that brodcasts on “Loop” when the game starts.
now we need 2 more properties, both of these are number properties and you can choose whatever value you want for them, just make sure they are an X and Y coordinate you can reach respectively.
PointX
PointY
Now go near that coordinate in the game, you should notice that while you do this the Activity Feed says “true” then move outside that area, the activity feed will now say false. note that you don’t have to be exactly at the coordianate for it to say “true” this means it works as intended!
Conclusion
This is a great system to use for PSUEDO hitboxes for games with PSUEDO projectiles. also its good to note that the hitbox doesn’t need to be ON the player, this can be used to make turrets that slow down players and other things of the such. if you liked the guide, please just press the like button. if you have feedback or the system didn’t work for you, then post it in the replies so that I can edit the guide to fit or I can help you fix your problems. Toodles!