Skip to content

How to add destructible trees to your map

abcdefg30 edited this page Dec 5, 2015 · 3 revisions

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 Floes, Boxes and Utility Poles 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 ๐ŸŽฒ

Modders โœ๏ธ

Developers ๐Ÿ”ง

Clone this wiki locally