PDA

View Full Version : Trigger problem



PrivateDwelling
08-10-2007, 17:49
I'm having a problem with a trigger. Sometimes the truck in question (MID 885) is not accessible, sometimes it is, when MID 57 enters the zone. BTW, the zone is quite large, so I don't think that is the problem. Any ideas? Code as follows:


{trigger "zis5able"
{condition
{term 1 "actors"
{selector
{"actors/mids" 57}
{"actors/type" human}
{"actors/zone" "truck2"}
{"actors/state" "not dead"}
}
{"limits/>=" 1}
}
}
{actions
{"ables"
{selector
{"actors/mids" 885}
}
{remove "select"}
}
}
}
{trigger "zis5disable"
{condition
{term 1 "actors"
{selector
{"actors/mids" 57}
{"actors/type" human}
{"actors/zone" "truck2"}
{"actors/state" "not dead"}
}
{"limits/>=" 1}
}
}
{actions
{"ables"
{selector
{"actors/mids" 885}
}
{add "select"}
}
}
}
{trigger "zis5message"
{condition
{term 1 "actors"
{selector
{"actors/mids" 885}
{"actors/zone" "truck"}
{"actors/type" vehicle}
}
{"limits/>=" 1}
}
}
{actions
{"message"
{text "Hah! Our gunners have come through our secret tunnel. Lesin must go and order the gunners to load the mortars."}
}
}
}

Albus
08-10-2007, 19:01
i see one contradicction.... trigger "zis5able" and trigger "zis5disable" have same condition !!!

then when this condition ocurrs.... which of them are valid???


plz tell me more data, what you want to do.

PrivateDwelling
09-10-2007, 10:37
The scenario is the Zis 5 drives into a zone (trigger "zis5message"). The Zis 5 is a player 1 vehicle but includes the code {Able {select 0}} so it cannot be touched yet. When Zis 5 is in zone "truck" message is displayed that MID 57 must approach truck.

As MID 57 approaches truck he enters zone "truck 2". The "zis5able" code should then make the truck accessible/under direct player control. This is similar to a discussion we had some time ago here http://www.digitalmindsoft.eu/forums/viewtopic.php?f=33&t=423

Albus
09-10-2007, 15:04
well then delete trigger "zis5disable" and must work fine ! ;)

PrivateDwelling
09-10-2007, 17:43
Silly me (again) :oops: . I thought both triggers were needed. Also, I should have had {add "select"} in "Zis5able", not {remove "select"}. Seems to be working OK now.

Albus
09-10-2007, 21:41
Right ! 8)