SAIL - pomoc/help [CZ/EN]

Vše ohledně SAILu a tvorby modifikací do OW.
Uživatelský avatar
Gravitr
Throwback Developer
Czech Republic
Příspěvky: 236
Registrován: pát črc 27, 2012 12:00 pm
Bydliště: CZ Prague
Kontaktovat uživatele:

SAIL - pomoc/help [CZ/EN]

Příspěvek od Gravitr »

[CZ]

Zdravím

Potřeboval bych udělat v SAILu jednu věc, ale nemůžu přijít, jak na to;

Potřebuju jakoby napsat "Když strana 1 útočí na stranu 2, potom...*". Ani pomocí tutoriálů se mi to nedaří postavit, chtěl jsem zkusit "On Command(attack) do", ale nevěděl jsem, jak dál, protože na OWN tenhle command neni rozepsanej dopodrobna (ComAttackUnit). Takže se vás ptám tady, jestli někdo neví, jak na to?

* Př. když máte s nějakou stranou (UI) neutrál a začnete jí attackovat, tak aby se změnila diplomacie.

Díky

G.

[EN]

Hello

I need to do in SAIL one thing, bud I dont know how;

I need "If side 1 attacking on side 2, then...*". I tried "On Command(attack) do", but I dont know how continue, because this command is not on OWN described in detail (ComAttackUnit). So I asking you here, if you dont know, how on it?

* For example when you have some side with UI and you have with this side neutral diplomacy, and when you attack on the side, the diplomacy change to "enemy".

^bad english
Thanks

G.
[MOD] Arabian History - 9 missions
Show post with download

[MOD] Vsevolod Mission - 4 pro missions
Show post with download

[MP-MOD] Throwback - over 35 new missions
Official site (+download)
Uživatelský avatar
Gothuk
Site Administrator
Site Administrator
Poland
Příspěvky: 985
Registrován: úte zář 04, 2007 6:10 pm
Bydliště: Poland, Warsaw
Kontaktovat uživatele:

Re: SAIL - pomoc/help [CZ/EN]

Příspěvek od Gothuk »

Hello Gravitr!

You can use Contact event (http://original-war.net/sailbase.php?di ... ents&id=12)

Example:

Kód: Vybrat vše

on Contact(side1, side2) do
begin
   if side1 = <my_side> and side2 = <enemy_side> then
   begin
      // code goes here...
   end;
end;
Where <my_side> is id of your side, and <enemy_side> id of your enemy side.
Uživatelský avatar
Gravitr
Throwback Developer
Czech Republic
Příspěvky: 236
Registrován: pát črc 27, 2012 12:00 pm
Bydliště: CZ Prague
Kontaktovat uživatele:

Re: SAIL - pomoc/help [CZ/EN]

Příspěvek od Gravitr »

Thank for quick reply.

I got error message:

Kód: Vybrat vše

Compiling error at Main line 200: Expression expected

I tried to write "then" after bracket, but no change.
[MOD] Arabian History - 9 missions
Show post with download

[MOD] Vsevolod Mission - 4 pro missions
Show post with download

[MP-MOD] Throwback - over 35 new missions
Official site (+download)
Uživatelský avatar
Gothuk
Site Administrator
Site Administrator
Poland
Příspěvky: 985
Registrován: úte zář 04, 2007 6:10 pm
Bydliště: Poland, Warsaw
Kontaktovat uživatele:

Re: SAIL - pomoc/help [CZ/EN]

Příspěvek od Gothuk »

Ahh, right. After if should be then and no brackets inside.
Too much C-like languages ;).

So line with the if condition should be:

Kód: Vybrat vše

if side1 = <my_side> and side2 = <enemy_side> then
Uživatelský avatar
Gravitr
Throwback Developer
Czech Republic
Příspěvky: 236
Registrován: pát črc 27, 2012 12:00 pm
Bydliště: CZ Prague
Kontaktovat uživatele:

Re: SAIL - pomoc/help [CZ/EN]

Příspěvek od Gravitr »

Now it's working. Thanks :P
[MOD] Arabian History - 9 missions
Show post with download

[MOD] Vsevolod Mission - 4 pro missions
Show post with download

[MP-MOD] Throwback - over 35 new missions
Official site (+download)
Uživatelský avatar
Gravitr
Throwback Developer
Czech Republic
Příspěvky: 236
Registrován: pát črc 27, 2012 12:00 pm
Bydliště: CZ Prague
Kontaktovat uživatele:

Re: SAIL - pomoc/help [CZ/EN]

Příspěvek od Gravitr »

Hm, i got fail at this event.


This work

Kód: Vybrat vše

if side1 = 1 and side2 = 2 then
This does not work

Kód: Vybrat vše

if side1 = 2 and side2 = 1 then
I tried to write this, but no change (attacking/player side is arabian nation)

Kód: Vybrat vše

if GetNation(side1) = nation_arabian and GetNation(side2) = nation_american then
Any ideas?
[MOD] Arabian History - 9 missions
Show post with download

[MOD] Vsevolod Mission - 4 pro missions
Show post with download

[MP-MOD] Throwback - over 35 new missions
Official site (+download)
Uživatelský avatar
Gothuk
Site Administrator
Site Administrator
Poland
Příspěvky: 985
Registrován: úte zář 04, 2007 6:10 pm
Bydliště: Poland, Warsaw
Kontaktovat uživatele:

Re: SAIL - pomoc/help [CZ/EN]

Příspěvek od Gothuk »

http://original-war.net/sailbase.php?di ... ents&id=12
detects contact (first attack, or after more then 1000 ticks); always side1<side2
What do you want to do?
Uživatelský avatar
Gravitr
Throwback Developer
Czech Republic
Příspěvky: 236
Registrován: pát črc 27, 2012 12:00 pm
Bydliště: CZ Prague
Kontaktovat uživatele:

Re: SAIL - pomoc/help [CZ/EN]

Příspěvek od Gravitr »

Side 2 (arabians yellow) attacking on side 1 (americans blue)

but I dont know how to write it, when side1 must be < than side2
[MOD] Arabian History - 9 missions
Show post with download

[MOD] Vsevolod Mission - 4 pro missions
Show post with download

[MP-MOD] Throwback - over 35 new missions
Official site (+download)
Uživatelský avatar
Gothuk
Site Administrator
Site Administrator
Poland
Příspěvky: 985
Registrován: úte zář 04, 2007 6:10 pm
Bydliště: Poland, Warsaw
Kontaktovat uživatele:

Re: SAIL - pomoc/help [CZ/EN]

Příspěvek od Gothuk »

You wrote:
Gravitr píše:This work

Kód: Vybrat vše

if side1 = 1 and side2 = 2 then
So what's the problem?
That should detect both: when side 2 attacking side 1, and also side 1 attacking side 2.
Uživatelský avatar
Gravitr
Throwback Developer
Czech Republic
Příspěvky: 236
Registrován: pát črc 27, 2012 12:00 pm
Bydliště: CZ Prague
Kontaktovat uživatele:

Re: SAIL - pomoc/help [CZ/EN]

Příspěvek od Gravitr »

Ah, I didn't know that it works both sides :wink: Thanks :)
[MOD] Arabian History - 9 missions
Show post with download

[MOD] Vsevolod Mission - 4 pro missions
Show post with download

[MP-MOD] Throwback - over 35 new missions
Official site (+download)
Uživatelský avatar
Gravitr
Throwback Developer
Czech Republic
Příspěvky: 236
Registrován: pát črc 27, 2012 12:00 pm
Bydliště: CZ Prague
Kontaktovat uživatele:

Re: SAIL - pomoc/help [CZ/EN]

Příspěvek od Gravitr »

I've got bug

I have area, which is for materalization (falling) crates. I wrote in sail just "CreateCrates in area".

Kód: Vybrat vše

every 0$30 marked 102 do
begin
  Wait(rand(2$50,4$30));
  CreateCratesArea(crates, 5, true);
  enable;
end;

But now i get the bug; the crates are falling into top together, where is no area. And to area didnt fall any crate.

Something like this
Spoiler:
Obrázek
Is here way how to fix it? It doing me only at 1 map.
[MOD] Arabian History - 9 missions
Show post with download

[MOD] Vsevolod Mission - 4 pro missions
Show post with download

[MP-MOD] Throwback - over 35 new missions
Official site (+download)
Uživatelský avatar
Gothuk
Site Administrator
Site Administrator
Poland
Příspěvky: 985
Registrován: úte zář 04, 2007 6:10 pm
Bydliště: Poland, Warsaw
Kontaktovat uživatele:

Re: SAIL - pomoc/help [CZ/EN]

Příspěvek od Gothuk »

Are you sure, that you typed a good variable name? Maybe you forgot to set correct identificator into area?

Edit.
Solved. The problem was with the bad parameters order. The first should be crates amount and second area.
Uživatelský avatar
Gravitr
Throwback Developer
Czech Republic
Příspěvky: 236
Registrován: pát črc 27, 2012 12:00 pm
Bydliště: CZ Prague
Kontaktovat uživatele:

Re: SAIL - pomoc/help [CZ/EN]

Příspěvek od Gravitr »

Hi, i need (tech_) constant of siberite implosion (mobile bomb), but i cant find it in identify.
Obrázek
[MOD] Arabian History - 9 missions
Show post with download

[MOD] Vsevolod Mission - 4 pro missions
Show post with download

[MP-MOD] Throwback - over 35 new missions
Official site (+download)
Uživatelský avatar
Gothuk
Site Administrator
Site Administrator
Poland
Příspěvky: 985
Registrován: úte zář 04, 2007 6:10 pm
Bydliště: Poland, Warsaw
Kontaktovat uživatele:

Re: SAIL - pomoc/help [CZ/EN]

Příspěvek od Gothuk »

http://original-war.net/sailbase.php?di ... roups#i_24

That should be one from
tech_Sib1 = 54
tech_Sib2 = 55
tech_Sib3 = 56
tech_SibContam = 26
tech_SibDet = 20
tech_SibEng = 22
tech_SibFiss = 25
tech_SibLoc = 19
tech_SibPow = 21
The first 3 are upgrades, Det - Detection, Eng - Engine, Pow - Power.
So this is sth from SibContam, SibFiss or SibLoc.
Uživatelský avatar
Gravitr
Throwback Developer
Czech Republic
Příspěvky: 236
Registrován: pát črc 27, 2012 12:00 pm
Bydliště: CZ Prague
Kontaktovat uživatele:

Re: SAIL - pomoc/help [CZ/EN]

Příspěvek od Gravitr »

I tried all technologies, which could be possible this tech. I also tried to write this tech in a lot of shapes. No result.

This technology probably missing in OWAR and it have no constant.
[MOD] Arabian History - 9 missions
Show post with download

[MOD] Vsevolod Mission - 4 pro missions
Show post with download

[MP-MOD] Throwback - over 35 new missions
Official site (+download)
Odpovědět