In, for example, a unit killed event, what do I write as the owner if I want it to be a barbarian units. I want my unit to get killed by a barbaran unit, and that will trigger a new unit of mine to be born. I have named the barbarians outlaw. IIRC if the barbarians are the attacker I shouldput "trigger attacker" or something. Anyone knows?
Announcement
Collapse
No announcement yet.
Quick event question.
Collapse
X
-
I think something like this should work:
@IF
UnitKilled
unit=AnyUnit
attacker=Outlaw
defender=AnyBody
@THEN
CreateUnit
owner=TriggerDefender
unit=New Unit of Mine
veteran=no
homecity=none
locations
0,0
1,1
endlocations
@ENDIF
Quote from Macro.txt: (shouldn't you have read this first? )
[q=macro.txt]TRIGGERATTACKER specifies the civilization that is the aggressor in a conflict trigger
(UNITKILLED or CITYTAKEN)
TRIGGERDEFENDER specifies the civilization that is the defender in a conflict trigger
(UNITKILLED or CITYTAKEN)
TRIGGERRECEIVER specifies the civilization that has the technology named in a
RECEIVEDTECHNOLOGY trigger[/q]
Though I believe they don't quite work properly? Or am I mixing things up? I can't remember.
-
Originally posted by Mercator
Quote from Macro.txt: (shouldn't you have read this first? )
Thanks for the info Merc. However, in my case I think it should be more like this:
@IF
UnitKilled
unit=barbarian trigger
attacker=Me
defender=Outlaw
@THEN
CreateUnit
owner=Me
unit=New Unit of Mine
veteran=no
homecity=none
locations
0,0
1,1
endlocations
@ENDIF
So should I put "Outlaw" or TriggerDefender" as defender?
I could put anybody as defender, but I want the defender to be the barbarians ONLY, as I use the same unit, with the evil force as a defender for a totally different event. I could make this a whole lot easy for me, since I have more unit slots, but if there's a specific thing to write for the barbarians, I want to learn."Peace cannot be kept by force.
It can only be achieved by understanding"
Comment
-
Um, as defender you can only use Outlaw. TriggerDefender is sometihng you'd put in the action, not in the trigger. Read the macro.txt. (not gonna quote it now )
Comment
-
@Arthedain:
If you want to use a custom name for the Barbarians, you'll need to edit their entry in labels.txt. For MGE that'd be the last of these lines:
Code:@LABELS 888 B.C. A.D. Civilization II Multiplayer Gold Building Sprites Map Status World City Building World Moving Units Viewing Pieces Loc Moves Veteran NONE Barbarians
Originally posted by Arthedain
I have named the barbarians outlaw.
Originally posted by Mercator
Though I believe they don't quite work properly? Or am I mixing things up? I can't remember.
Comment
-
Is that the only place you renamed them? What if you change it back to the original and use Barbarians in the rules? Does it still not work? Because then it would clearly be something else that's the problem.
Comment
-
I'll have another bash at it then.
Originally posted by Arthedain
I want my unit to get killed by a barbaran unit, and that will trigger a new unit of mine to be born.Originally posted by Arthedain
@IF
UnitKilled
unit=barbarian trigger
attacker=Me
defender=Outlaw
@THEN
Comment
-
Originally posted by Catfish
OK, so who is meant to get killed, your unit or the barbarian? It sounds like you want the event triggered when your unit is killed by a specific type of barbarian unit. There is no provision in the events language to define the unit type of the attacker (the winner of the fight). In my WotR scenario, I get around this type of thing by limiting access to trigger units by way of map transport relationships (ToT only) and also via the 'attack air units in flight' flag, but that's probably not much use to you, is it?
@ Mercator: I haven't had the time to actually change back the names yet. But I guess that's not the problem."Peace cannot be kept by force.
It can only be achieved by understanding"
Comment
-
It happens to all games you're loading/starting, right? Not just one?
Deleting the Civ2.dat file fixes that, I believe.
Comment
Comment