This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
4rpl:commands:setfieldcell [2021/02/07 22:33] – created virgilw | 4rpl:commands:setfieldcell [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
~~NOTOC~~ | ~~NOTOC~~ | ||
< | < | ||
+ | <WRAP tabs> | ||
+ | * [[4rpl: | ||
+ | * [[4rpl: | ||
+ | </ | ||
:!: Available in version 1.3 and later. | :!: Available in version 1.3 and later. | ||
====== SetFieldCell ====== | ====== SetFieldCell ====== | ||
Line 8: | Line 11: | ||
===== Description ===== | ===== Description ===== | ||
Sets the field cell as the specified location. | Sets the field cell as the specified location. | ||
+ | |||
+ | **Fields are reset on map load, so any fields must be recreated in the [[func_awake|: | ||
+ | |||
+ | This method will **set** the field on the specified cell to a certain value. That means if there already was a field underneath, its effect will be erased. If you're not careful, you will erase the effect of nearby shields, singularity or other custom fields with this. This is something you should never allow to happen, as shields/ | ||
+ | |||
+ | In order to add to a field rather than set it, retrieve its current values first using [[GetFieldCell]], | ||
+ | |||
+ | For reference: | ||
+ | Shields have a field (total " | ||
===== Examples ===== | ===== Examples ===== | ||
<code 4rpl> | <code 4rpl> | ||
- | SetFieldCell(50 40 false V2(1000000 1000000) | + | :Awake |
+ | SetFieldCell(50 40 false V2(1000000 1000000)) | ||
</ | </ | ||
< | < |