Edytor

Tematy zbędne, ale zbyt dobre by je usunąć znajdują się tutaj.
User avatar
Nazim
Community Veteran
Community Veteran
Posts: 125
Joined: Wed Apr 12, 2006 2:40 pm
Location: Prypiat, Chornobyl
Contact:

Post by Nazim »

czy ja wiem? tak szczerze mowiac nie chce mi sie wierzyc, ze masz legalnego photoshopa, jak nawet na bilet autobusowy (1,25 zl w warszawie) ci szkoda xD
Добрий день.. Акуна Матата!

Image
Image
Image
User avatar
YuriStriatov
Site Administrator
Site Administrator
Cuba
Posts: 1395
Joined: Fri Feb 17, 2006 3:02 am
Contact:

Post by YuriStriatov »

LOL nazy ja mam legalnie photoshopa. Jak chce korzystac to cofam rok w kompie o 5 lat xDDD (nie ma to jak triale LOL)
Image
User avatar
Nazim
Community Veteran
Community Veteran
Posts: 125
Joined: Wed Apr 12, 2006 2:40 pm
Location: Prypiat, Chornobyl
Contact:

Post by Nazim »

nie "LOL nazy" tylko ku**a i tak lzesz jak pies, bo wiem ze masz photoshopa z "legalnym" (bynajmniej nie dla ciebie) serialem.. i ku**a sie odezwij na gg rumunie.. arararara
Добрий день.. Акуна Матата!

Image
Image
Image
User avatar
YuriStriatov
Site Administrator
Site Administrator
Cuba
Posts: 1395
Joined: Fri Feb 17, 2006 3:02 am
Contact:

Post by YuriStriatov »

ku**a wogole nie mam seriala do photoshopa. Mam triala :P Jak chce uzytkowac to cofam date o 5 lat xd
Image
User avatar
ditos
Soldier level 1
Soldier level 1
Posts: 19
Joined: Mon May 08, 2006 7:21 am
Location: Poland> OW Edytor

Post by ditos »

O stary sory:P pojebało mi sie. Jam moge zrobić coś takiego że gdy jednostka wejdzie mi do danego obszaru to powiedzmy coś się stanie. Puki co robiłem to tak że dawałem UnitInArea blablabla ale nic sie niedziało.
Normalnie w pascalu jest taka komenda jak IF THEN ELSE, jest jakis odpowiednik w SAILU no bo tak to nie działa. Mam też problem z dialogami. Jak to jest z tą komendą WAIT i DWAIT. Jest tak ze jak daje np. wait(200) to czeka 200 tck np. jest 300 tck i daje ta komende to te 200 idzie od początku czyl od 0 czy od 300 ??
Original War is my life, my girl and my fuel to correct existance.
User avatar
YuriStriatov
Site Administrator
Site Administrator
Cuba
Posts: 1395
Joined: Fri Feb 17, 2006 3:02 am
Contact:

Post by YuriStriatov »

SAIL ma zblizona skladnie do pascala, struktury kontrolne ma wiec (if, else itd) :P
Image
User avatar
Maydex
Community Veteran
Community Veteran
Posts: 96
Joined: Sat Feb 18, 2006 3:23 pm
Location: Kyrgystan

Post by Maydex »

ejj no kur ale co? ma program name;
uses crt;
i takie cos? no co wy pie***ycie
Image
User avatar
stucuk
OWSupport.com Owner
Posts: 438
Joined: Tue Apr 18, 2006 12:10 am
Location: UK, Scotland

Post by stucuk »

It doesn't have Uses and you don't do program name.

1.06's Editor has a Includes thing where u can add SAIL files from \SAIL\Libraries\ into a map. (The Idea being to be like the Uses thing. Tho you do not add Code to add them, you just click a button)

SAIL files included this way act like a normal maps SAIL file, all of them can use any others EXPORT'd things.

One SAIL file should have:
starting
begin

end;
Which is the first bit of code thats executed which normaly sets up everything.

AFAIK there is no 'Procedures' in SAIL, you just use a Function. Functions and Varibles don't need to have there TYPE declared. I.E

Pascal:

Code: Select all

Function Something(AVarible : String) : String;
begin
Result := AVarible;
end;
In SAIL:

Code: Select all

Function Something(AVarible);
begin
Result := AVarible;
end;
Pascal:

Code: Select all

Procedure Something(AVarible : String);
begin

end;
SAIL:

Code: Select all

Function Something(AVarible);
begin

end;
Anything thats EXPORTED needs to have EXPORT b4 there name, i.e:

Making a Varible usable in every module:

Code: Select all

EXPORT AVarible;
Making a Function usable in every module:

Code: Select all

EXPORT Function Something(AVarible);
begin

end;
- Stu
OWSupport
User avatar
ditos
Soldier level 1
Soldier level 1
Posts: 19
Joined: Mon May 08, 2006 7:21 am
Location: Poland> OW Edytor

Post by ditos »

dobra, ale jak zrobić żeby mi to if then else działało. robie mniej wiecej taki kod, niepodam go teraz dokładnie.
starting
begin

if unitinarea(2,2) do
centeronunit(2);
commoveunitxy([1,2],x,y);
end;
end
;

jakoś tak to wygląda, dawałem jeszcze funkcje
funkcion lol;
begin
centeronunit(2);
commoveunitxy([1,2],x,y);
end;

tak jak mówie dokładnie teraz tych komend nie pamiętam, wiec kod nie będzie dokładny.

albo jak chcę zrobić więcej modółówm, jak to sie robi bo nie moge dac w dwóch starting czy wiecej, jak to sie robi??
Original War is my life, my girl and my fuel to correct existance.
User avatar
stucuk
OWSupport.com Owner
Posts: 438
Joined: Tue Apr 18, 2006 12:10 am
Location: UK, Scotland

Post by stucuk »

SAIL Syntax like every other language(Well all main programming languages, so far iv not found one which doesn't use English for the Syntax) uses English words. You can not use Polish words for Syntax things.

I.E

Code: Select all

funkcion lol; 
begin 
centeronunit(2); 
commoveunitxy([1,2],x,y); 
end; 
That WILL NOT work. It needs to be Function

Code: Select all

if unitinarea(2,2) do
That won't work.
- Stu
OWSupport
User avatar
ditos
Soldier level 1
Soldier level 1
Posts: 19
Joined: Mon May 08, 2006 7:21 am
Location: Poland> OW Edytor

Post by ditos »

On pisze wszystko po angielsku?? Ok, so then how to do this??Today i have made code like this one:
function zonk;
begin
sendsiberiterocket(x,y);
end;

function meet;
begin
centeronxy(x,y);
commoveunittoarea( or commovetoarea)([1,2],area);
end;

function side;
begin
setside(unit,1);
end;

starting
begin
wait(1000);
if unitinarea(unit,area) then meet
else zonk;
if unitinarea(unit,area) then side
else zonk;
end;

is this code ok? function meet is starting before 1000 tck, also i have troubles with dialogues(ingamein etc.)
Original War is my life, my girl and my fuel to correct existance.
User avatar
stucuk
OWSupport.com Owner
Posts: 438
Joined: Tue Apr 18, 2006 12:10 am
Location: UK, Scotland

Post by stucuk »

Assuming things like X,Y,Unit,Area are Global varibles. If there ment to be inputs into the functions like Zonk(5,6); then u need to do:

Code: Select all

Function Zonk(x,y);
begin
sendsiberiterocket(x,y); 
end;
To Activate things after a certain time u can do:

Code: Select all

Every 0$01 do
begin
if unitinarea(unit,area) then meet 
else zonk; 
if unitinarea(unit,area) then side 
else zonk;
end;
If enabled isn't between begin and end of an Every then its disabled after its used.

I.e to have an every repeat u would do:

Code: Select all

Every 0$01 do
begin
Enabled;
end;
0$01 is the time. Anything b4 the $ is minutes and after is seconds. So 10$0 is 10 Minutes and 0$10 is 10 seconds.

Some Misc SAIL + General modding info can be found Here (Can't be bothered linking to direct help for things)
A Small tutorial on SAIL Basics can be found Here
- Stu
OWSupport
User avatar
ditos
Soldier level 1
Soldier level 1
Posts: 19
Joined: Mon May 08, 2006 7:21 am
Location: Poland> OW Edytor

Post by ditos »

Thanx Stuck youre GREAT! So then i want to do query. blablabla in .txt file but how to do something if i tipically choose one of three option.
like this one:

what to do?(and there are x options)
-x1
-x2 (how to do something like if i choose x1 then game exits or if i choose x2 then i gained 100 crates)

also i have troubles with areas.

---

function side;
begin
setside(52,1);
end;

function zonk;
begin
sendsiberiterocket(66,48);
end;

function meeting;
begin
centeronxy(66,48);
commovetoarea(52,1);
end;

starting
begin
wait(1000);
IF IsInArea(68,1) then meeting
else ;
if isinarea(52,2) then side;
end;


i made this code and. function side dosnt work when unit 52 enters area 2;
its automatickly goes to area 1 before i get there by unit 68;
:?:
Original War is my life, my girl and my fuel to correct existance.
User avatar
stucuk
OWSupport.com Owner
Posts: 438
Joined: Tue Apr 18, 2006 12:10 am
Location: UK, Scotland

Post by stucuk »

ditos wrote:function side;
begin
setside(52,1);
end;

function zonk;
begin
sendsiberiterocket(66,48);
end;

function meeting;
begin
centeronxy(66,48);
commovetoarea(52,1);
end;

starting
begin
wait(1000);
IF IsInArea(68,1) then meeting
else ;
if isinarea(52,2) then side;
end;


i made this code and. function side dosnt work when unit 52 enters area 2;
its automatickly goes to area 1 before i get there by unit 68;
:?:
u should have it like:

Code: Select all

Every 00$01 do
begin
IF IsInArea(68,1) then meeting
else 
enabled;
end;

Every 00$01 do
begin
if isinarea(52,2) then side 
else 
enabled;
end;
Query Example:

Code: Select all

case Query('Q1') of
      1:begin
          Say(Heike,'D3aH1');
// you start to attack ...
          SetAttitude(you,americans,att_enemy,false);
          ComAttackUnit(Heike,am1);
          wait(am1reaction);
          ingame_video:=false;
          ingameoff;
// ... and american start to attack you. You can play again
          SetAttitude(americans,you,att_enemy,false);
          ComFree(am1);
          ComAttackUnit(am1,Heike);

// ... but botho russians are comming
          wait(0$3);
          com_queue:=true;
          ComAttackUnit(rusboth,am1);
          ComAttackUnit(rusboth,Heike);
          com_queue:=false;
          Say(rus1,'D3aR1');
        end;
      2:begin
          Say(Heike,'D3bH1');
          ComMoveXY(Heike,67,18);
// you go away
          wait(0$1);
          ingame_video:=false;
          ingameoff;
// and russians are comming
          com_queue:=true;
          ComAttackUnit(rusboth,am1);
          ComFree(rusboth);
          com_queue:=false;
          Say(rus1,'D3bR1');
          ComFree(am1);
        end;
      3:begin
// you move forward
          Say(Heike,'D3cH1');
          ComMoveUnit(Heike,rus1);
          ingame_video:=false;
          ingameoff;
// you move toward the russians
          wait(0$2);
          ComStop(Heike);
          com_queue:=true;
// they want am1 to die
          ComAttackUnit(rusboth,am1);
          ComFree(rusboth);
          com_queue:=false;
          Say(rus1,'D3cR1');
          ComFree(am1);
        end;
    end;
- Stu
OWSupport
User avatar
ditos
Soldier level 1
Soldier level 1
Posts: 19
Joined: Mon May 08, 2006 7:21 am
Location: Poland> OW Edytor

Post by ditos »

Ok stuck, but can u give me better example of query?
And what is this --->> "// they want am1 to die"
I dont know how can it be in english so to jest komentarz czy co?
dalej nie wiem jak zrobic coś takiego ze jak wybiore jedną opcje z powiedzmy 3 które dałem do query to np. jakis kolo sie domnie przyłączy, albo zacznie sie ze mną nawalać itd.
Mogłem to napisać po angielsku ale po co łamać sobie palce na klawie.

---

Also i try to use EVERY but that command wasn`t work?
it must be
every 00$1 blablabla
or it must be
every 0$1 blablabla?
Original War is my life, my girl and my fuel to correct existance.
Locked