How to add destructible trees to your map
This guide assumes you have knowledge of creating and editing OpenRA maps (See Mapping).
In both RA and TD you just have to add following lines to ^Tree:
under Rules:
Targetable:
TargetTypes: Ground
This allows the trees to be targeted by any weapon that can target the TargetType
Ground
.
Note: If you use an older version than 20150920, you want to use TargetableBuilding:
instead of Targetable:
.
The RA and TD mods also have (at the moment unused) artwork for dieing trees, so you can add:
WithDeathAnimation:
DeathSequence: dead
UseDeathTypeSuffix: false
The yaml in total should look like this: (Without other additions you did to your map.)
Rules:
^Tree:
Targetable:
TargetTypes: Ground
WithDeathAnimation:
DeathSequence: dead
UseDeathTypeSuffix: false
###IMPORTANT###
In Red Alert not only trees, but also other actors like Ice Floe
s, Boxes
and Utility Pole
s inherit ^Tree
and will thus get targetable and crash the game when destroyed.
So either don't place them or add this extra yaml to your Rules
section:
BOXES01:
-Targetable:
BOXES02:
-Targetable:
BOXES03:
-Targetable:
BOXES04:
-Targetable:
BOXES05:
-Targetable:
BOXES06:
-Targetable:
BOXES07:
-Targetable:
BOXES08:
-Targetable:
BOXES09:
-Targetable:
ICE01:
-Targetable:
ICE02:
-Targetable:
ICE03:
-Targetable:
ICE04:
-Targetable:
ICE05:
-Targetable:
UTILPOL1:
-Targetable:
UTILPOL2:
-Targetable:
For further information, see #9102.
- Code by deniz1a
Players ๐ฒ
- FAQ โ
- Installation ๐ฆ
- Game Content ๐ฟ
- Hotkeys and Stances ๐ฎ
- Strategies ๐
- Settings ๐ง
- Dedicated Server โพ
- RaspberryPi ๐
- Badges & Icons ๐ฅ
- Changelog ๐
Modders โ๏ธ
- Audio guide ๐
- Traits ๐
- Palettes and Remaps ๐จ
- World Coordinate System ๐
- Map scripting
- Lua-API ๐
- Conditions ๐
- Mapping ๐ง
- Pixelart ๐
Developers ๐ง
- Contributing โค๏ธ
- Compiling
- Hacking
- Coding Standard ๐
- Branches and Releases ๐
- Release Checklist โ
- Sequences
- Glossary
- Reverse engineering ๐
- License ยฉ๏ธ