This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
4rpl:overview [2021/02/21 22:47] – Karsten75 | 4rpl:overview [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
< | < | ||
+ | |||
+ | :!: To edit files you will need an editor. Read how to get started with [[creating and editing 4rpl scripts]]. | ||
====== Scripting ====== | ====== Scripting ====== | ||
Line 35: | Line 37: | ||
</ | </ | ||
- | Run this **once** in the console and then unpause the game and let the game simulation run a few frames. You will see a stack of 100 deep creeper at map coordinate x=12 and z=23 ((For more information on the game coordinate system and why we use **x** and **z** coordinates, | + | Run this **once** in the console and then unpause the game and let the game simulation run a few frames. You will see a stack of 100 deep creeper at map coordinate x=12 and z=23 ((For more information on the game coordinate system and why we use **x** and **z** coordinates, |
Line 56: | Line 58: | ||
12 23 100 AddCreeper | 12 23 100 AddCreeper | ||
AddCreeper(12 23 100) # Does the same thing as the line above. | AddCreeper(12 23 100) # Does the same thing as the line above. | ||
+ | |||
+ | 1 (2 3 +) 4 # Demonstrate wrapping affects all stack locations. | ||
+ | 2 3 + 1 4 # This line is the same as the one above. | ||
</ | </ | ||
Line 69: | Line 74: | ||
endif | endif | ||
</ | </ | ||
+ | |||
+ | |||
+ | |||
+ | Note: See [[4rpl:Data Types]] for comparison between dissimilar types and type conversion. | ||
+ | |||
+ | |||
===== Variables ===== | ===== Variables ===== | ||
Line 77: | Line 88: | ||
"3 plus 4 is" <-result TraceAllSP | "3 plus 4 is" <-result TraceAllSP | ||
</ | </ | ||
+ | |||
+ | |||
+ | |||
+ | Note: See [[4rpl:Data Types]] for comparison between dissimilar types and type conversion. | ||
+ | |||
+ | |||
===== Functions ===== | ===== Functions ===== | ||
Line 112: | Line 129: | ||
</ | </ | ||
- | What you want to do is make sure there are no 4rpl files on disk at that location, then import | + | If you load map as a regular player and then enter edit mode, the game will stick the scripts into the _UNKNOWN project directory. If there are already matching |
+ | |||
+ | The case of on-the-fly opening the editor in a map you are playing is no different -with one exception: The game doesn' | ||
+ | |||
+ | If you want to grab the scripts from a map (like an FPS map) and you want to make sure you have the latest scripts, you should either create a project for the map and open it from the project page, or you should clean your _UNKNOWN directory before you open the map on the fly. | ||
+ | |||
+ | Basically, just deleting the _UNKNOWN directory is the easiest way to clean it | ||