[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Problem with unit destruction trigger



I've attached a small test map.

I was attempting to implement another idea I had that involves activating a trigger when a certain enemy unit type is destroyed.

In the test map, I have two enemy (player 2) scouts. When the first scout is destroyed, nothing happens. When the second scout is destroyed, the event is triggered as expected.


Oops. As I was writing this, I just realized it was meant to check if ALL units of a type have been destroyed. A quick re-work of the map verified this.


I wanted to use a destruction trigger to increase research capability:

Imagine a new, lone factory with nothing but infantry. The enemy finds the outpost and starts to invade. The only way to gain research capability and fight back effectively would be to destroy an enemy's unit. Destroy one of their scouts, and your researchers would be able to dissect it and use this information to produce scouts at your factory in a turn or two.

This could still be done quite easily by attaching the trigger to a specific unit's destruction, but wouldn't be nearly as useful.

Would it be a huge change to make another flag for the unit destruction trigger that meant "any unit of type X"?

-Z

Attachment: destructiontest.lev
Description: Binary data

[mission]
name = 0
mapwidth = 10
mapheight = 10
info = 0
skirmish = 1
campaign = 0
campaignname = -1
campaigninfo = -1
players = 1
tileset = default
unitset = default

[map-raw]
81,80,79,79,38,38,38,65,65,65
80,78,80,78,38,38,38,38,65,38
78,78,79,77,30,30,38,38,65,38
38,80,30,38,30,30,30,38,38,38
38,38,30,30,30,30,30,38,38,38
38,38,38,38,30,30,38,38,38,38
65,38,38,38,30,38,65,38,38,38
66,65,65,38,38,38,38,38,38,30
117,117,65,66,38,38,30,30,30,30
117,117,65,38,38,38,38,38,30,30

[player]
name = 1
briefing = 0
fcolor = 254,166,4
bcolor = 86,54,12

[player]
name = 2
briefing = 0
fcolor = 0,170,255
bcolor = 2,38,92

[unit]
type = Heavy Tanks
player = 1
id = 0
pos = 4/6
xp = 6

[unit]
type = Scouts
player = 2
id = 1
pos = 4/5
size = 2

[unit]
type = Scouts
player = 2
id = 2
pos = 6/0
size = 2

[event]
id = 0
type = sethex
player = 1
discard = 0
title = 4
message = 3
trigger = unitdestroyed
tunit = Scouts
towner = 2
tile = 0
pos = 0/0

[messages(en)]
Destruction Test
%
Player 1
%
Player 2
%
One of Player 2's Scouts has been destroyed.
%
Event activated
[/messages]