SAIL - Wywołanie kodu po zniszczeniu pojazdu

Gotowe kody SAIL'a, informacje na temat moddingu, itd.

Moderator: zoNE

Post Reply
User avatar
zoNE
The Great Uniter & Site Administrator
The Great Uniter & Site Administrator
Posts: 2059
Joined: Fri Feb 17, 2006 3:44 pm
Location: Poland
Contact:

SAIL - Wywołanie kodu po zniszczeniu pojazdu

Post by zoNE »

Gothuk wrote:

Code: Select all

on UnitDestroyed(un) do
    if un = pojazd then
    begin
        //kod
    end;
Gothuk wrote:

Code: Select all

export pojazd_zniszczony;

// gdzieś w starting
pojazd_zniszczony = false;

on UnitDestroyed(un) do
	if un = pojazd then
	begin
		Say(postac,'Dialog4');
		ChangeMissionObjectives('M4');
		ChangeMissionObjectives('CEL3');
		pojazd_zniszczony = true;
	end;

every 0$1 trigger ( FilterUnitsInArea(area2,[[f_side,1],[f_type,2],[f_not, [f_or, [f_weapon,12], [f_weapon,11]] ] ]) ) > 0 and pojazd_zniszczony do
begin
	Say(postac,'Dialog1');
	Say(postac1,'Dialog2');
	Say(postac1,'Dialog3');
	ChangeMissionObjectives('M3');
	ChangeMissionObjectives('CEL2');
end;
Author: Gothuk
Topic: http://forum.original-war.net/viewtopic.php?f=42&t=3197
Post Reply