I made this code to help me place sphere effects so I could create off-limits areas. I figured it might be useful for other people, so I’m sharing the code:
BXMWV
NOTE: This is just a basic tool, I didn’t want to spend too much time making it as I found it useful enough like this
What it does:
It lets you place effects and resize them, and save their position and radius to global arrays so you can screenshot the values in the workshop inspector.
I also included a code for detecting collision with spheres and pushing the player away from them.
in-game controls:
Read the custom game description after importing the code
How do I make the effects I place spawn every time the map loads?
- place an effect
- hold crouch for a second to save it’s position
- open the workshop inspector
- click the dropdown menu and select “global”
- screenshot the global variables (A is the current map, B is the position of your effects, C is the radius)
- Look at the rule for Horizon lunar colony, and do the same thing that’s done there. At the top there are some initializing actions, then the same 5 actions are just copy pasted over and over, with the position and radius in the X and Y variables changed. The condition of the rule contains a number which is the map index.
- If you come here in the future, go to this page for the latest map identifier script by Xerxes.
For sphere collision, look at the bottom two rules. One is to initialize a variable, the other is to continuously check for collisions and push the player away from the spheres.
Special thanks to Xerxes for creating the map identifier script. Without it, I probably wouldn’t have made this.