Page 1 of 2

SAIL - pomoc/help [CZ/EN]

Posted: Fri May 10, 2013 5:26 pm
by 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.

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

Posted: Fri May 10, 2013 8:53 pm
by Gothuk
Hello Gravitr!

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

Example:

Code: Select all

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.

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

Posted: Fri May 10, 2013 10:00 pm
by Gravitr
Thank for quick reply.

I got error message:

Code: Select all

Compiling error at Main line 200: Expression expected

I tried to write "then" after bracket, but no change.

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

Posted: Fri May 10, 2013 10:08 pm
by 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:

Code: Select all

if side1 = <my_side> and side2 = <enemy_side> then

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

Posted: Fri May 10, 2013 10:41 pm
by Gravitr
Now it's working. Thanks :P

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

Posted: Fri Nov 01, 2013 5:55 pm
by Gravitr
Hm, i got fail at this event.


This work

Code: Select all

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

Code: Select all

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

Code: Select all

if GetNation(side1) = nation_arabian and GetNation(side2) = nation_american then
Any ideas?

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

Posted: Fri Nov 01, 2013 6:01 pm
by 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?

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

Posted: Fri Nov 01, 2013 6:47 pm
by 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

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

Posted: Fri Nov 01, 2013 6:55 pm
by Gothuk
You wrote:
Gravitr wrote:This work

Code: Select all

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.

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

Posted: Fri Nov 01, 2013 7:36 pm
by Gravitr
Ah, I didn't know that it works both sides :wink: Thanks :)

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

Posted: Wed Nov 06, 2013 8:48 pm
by Gravitr
I've got bug

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

Code: Select all

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:
Image
Is here way how to fix it? It doing me only at 1 map.

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

Posted: Wed Nov 06, 2013 10:00 pm
by 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.

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

Posted: Wed Dec 18, 2013 7:11 pm
by Gravitr
Hi, i need (tech_) constant of siberite implosion (mobile bomb), but i cant find it in identify.
Image

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

Posted: Wed Dec 18, 2013 7:24 pm
by 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.

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

Posted: Thu Dec 19, 2013 5:17 pm
by 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.