SAIL - pomoc/help [CZ/EN]

Vše ohledně SAILu a tvorby modifikací do OW.
Avatar de Usuario
Gravitr
Throwback Developer
Czech Republic
Mensajes: 236
Registrado: Vie Jul 27, 2012 12:00 pm
Ubicación: CZ Prague
Contactar:

SAIL - pomoc/help [CZ/EN]

Mensaje por 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)
Avatar de Usuario
Gothuk
Site Administrator
Site Administrator
Poland
Mensajes: 985
Registrado: Mar Sep 04, 2007 6:10 pm
Ubicación: Poland, Warsaw
Contactar:

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

Mensaje por Gothuk »

Hello Gravitr!

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

Example:

Código: Seleccionar todo

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.
Avatar de Usuario
Gravitr
Throwback Developer
Czech Republic
Mensajes: 236
Registrado: Vie Jul 27, 2012 12:00 pm
Ubicación: CZ Prague
Contactar:

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

Mensaje por Gravitr »

Thank for quick reply.

I got error message:

Código: Seleccionar todo

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)
Avatar de Usuario
Gothuk
Site Administrator
Site Administrator
Poland
Mensajes: 985
Registrado: Mar Sep 04, 2007 6:10 pm
Ubicación: Poland, Warsaw
Contactar:

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

Mensaje por 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:

Código: Seleccionar todo

if side1 = <my_side> and side2 = <enemy_side> then
Avatar de Usuario
Gravitr
Throwback Developer
Czech Republic
Mensajes: 236
Registrado: Vie Jul 27, 2012 12:00 pm
Ubicación: CZ Prague
Contactar:

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

Mensaje por 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)
Avatar de Usuario
Gravitr
Throwback Developer
Czech Republic
Mensajes: 236
Registrado: Vie Jul 27, 2012 12:00 pm
Ubicación: CZ Prague
Contactar:

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

Mensaje por Gravitr »

Hm, i got fail at this event.


This work

Código: Seleccionar todo

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

Código: Seleccionar todo

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

Código: Seleccionar todo

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)
Avatar de Usuario
Gothuk
Site Administrator
Site Administrator
Poland
Mensajes: 985
Registrado: Mar Sep 04, 2007 6:10 pm
Ubicación: Poland, Warsaw
Contactar:

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

Mensaje por 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?
Avatar de Usuario
Gravitr
Throwback Developer
Czech Republic
Mensajes: 236
Registrado: Vie Jul 27, 2012 12:00 pm
Ubicación: CZ Prague
Contactar:

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

Mensaje por 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)
Avatar de Usuario
Gothuk
Site Administrator
Site Administrator
Poland
Mensajes: 985
Registrado: Mar Sep 04, 2007 6:10 pm
Ubicación: Poland, Warsaw
Contactar:

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

Mensaje por Gothuk »

You wrote:
Gravitr escribió:This work

Código: Seleccionar todo

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.
Avatar de Usuario
Gravitr
Throwback Developer
Czech Republic
Mensajes: 236
Registrado: Vie Jul 27, 2012 12:00 pm
Ubicación: CZ Prague
Contactar:

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

Mensaje por 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)
Avatar de Usuario
Gravitr
Throwback Developer
Czech Republic
Mensajes: 236
Registrado: Vie Jul 27, 2012 12:00 pm
Ubicación: CZ Prague
Contactar:

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

Mensaje por Gravitr »

I've got bug

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

Código: Seleccionar todo

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:
Imagen
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)
Avatar de Usuario
Gothuk
Site Administrator
Site Administrator
Poland
Mensajes: 985
Registrado: Mar Sep 04, 2007 6:10 pm
Ubicación: Poland, Warsaw
Contactar:

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

Mensaje por 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.
Avatar de Usuario
Gravitr
Throwback Developer
Czech Republic
Mensajes: 236
Registrado: Vie Jul 27, 2012 12:00 pm
Ubicación: CZ Prague
Contactar:

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

Mensaje por Gravitr »

Hi, i need (tech_) constant of siberite implosion (mobile bomb), but i cant find it in identify.
Imagen
[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)
Avatar de Usuario
Gothuk
Site Administrator
Site Administrator
Poland
Mensajes: 985
Registrado: Mar Sep 04, 2007 6:10 pm
Ubicación: Poland, Warsaw
Contactar:

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

Mensaje por 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.
Avatar de Usuario
Gravitr
Throwback Developer
Czech Republic
Mensajes: 236
Registrado: Vie Jul 27, 2012 12:00 pm
Ubicación: CZ Prague
Contactar:

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

Mensaje por 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)
Responder