[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.
SAIL - pomoc/help [CZ/EN]
- Gravitr
- Throwback Developer
- Posts: 236
- Joined: Fri Jul 27, 2012 12:00 pm
- Location: CZ Prague
- Contact:
SAIL - pomoc/help [CZ/EN]
[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)
Show post with download
[MOD] Vsevolod Mission - 4 pro missions
Show post with download
[MP-MOD] Throwback - over 35 new missions
Official site (+download)
- Gothuk
- Site Administrator
- Posts: 985
- Joined: Tue Sep 04, 2007 6:10 pm
- Location: Poland, Warsaw
- Contact:
Re: SAIL - pomoc/help [CZ/EN]
Hello Gravitr!
You can use Contact event (http://original-war.net/sailbase.php?di ... ents&id=12)
Example:
Where <my_side> is id of your side, and <enemy_side> id of your enemy side.
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;
- Gravitr
- Throwback Developer
- Posts: 236
- Joined: Fri Jul 27, 2012 12:00 pm
- Location: CZ Prague
- Contact:
Re: SAIL - pomoc/help [CZ/EN]
Thank for quick reply.
I got error message:
I tried to write "then" after bracket, but no change.
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.
[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)
Show post with download
[MOD] Vsevolod Mission - 4 pro missions
Show post with download
[MP-MOD] Throwback - over 35 new missions
Official site (+download)
- Gothuk
- Site Administrator
- Posts: 985
- Joined: Tue Sep 04, 2007 6:10 pm
- Location: Poland, Warsaw
- Contact:
Re: SAIL - pomoc/help [CZ/EN]
Ahh, right. After if should be then and no brackets inside.
Too much C-like languages .
So line with the if condition should be:
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
- Gravitr
- Throwback Developer
- Posts: 236
- Joined: Fri Jul 27, 2012 12:00 pm
- Location: CZ Prague
- Contact:
Re: SAIL - pomoc/help [CZ/EN]
Now it's working. 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)
Show post with download
[MOD] Vsevolod Mission - 4 pro missions
Show post with download
[MP-MOD] Throwback - over 35 new missions
Official site (+download)
- Gravitr
- Throwback Developer
- Posts: 236
- Joined: Fri Jul 27, 2012 12:00 pm
- Location: CZ Prague
- Contact:
Re: SAIL - pomoc/help [CZ/EN]
Hm, i got fail at this event.
This work
This does not work
I tried to write this, but no change (attacking/player side is arabian nation)
Any ideas?
This work
Code: Select all
if side1 = 1 and side2 = 2 then
Code: Select all
if side1 = 2 and side2 = 1 then
Code: Select all
if GetNation(side1) = nation_arabian and GetNation(side2) = nation_american then
[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)
Show post with download
[MOD] Vsevolod Mission - 4 pro missions
Show post with download
[MP-MOD] Throwback - over 35 new missions
Official site (+download)
- Gothuk
- Site Administrator
- Posts: 985
- Joined: Tue Sep 04, 2007 6:10 pm
- Location: Poland, Warsaw
- Contact:
Re: SAIL - pomoc/help [CZ/EN]
http://original-war.net/sailbase.php?di ... ents&id=12
What do you want to do?detects contact (first attack, or after more then 1000 ticks); always side1<side2
- Gravitr
- Throwback Developer
- Posts: 236
- Joined: Fri Jul 27, 2012 12:00 pm
- Location: CZ Prague
- Contact:
Re: SAIL - pomoc/help [CZ/EN]
Side 2 (arabians yellow) attacking on side 1 (americans blue)
but I dont know how to write it, when side1 must be < than side2
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)
Show post with download
[MOD] Vsevolod Mission - 4 pro missions
Show post with download
[MP-MOD] Throwback - over 35 new missions
Official site (+download)
- Gothuk
- Site Administrator
- Posts: 985
- Joined: Tue Sep 04, 2007 6:10 pm
- Location: Poland, Warsaw
- Contact:
Re: SAIL - pomoc/help [CZ/EN]
You wrote:
That should detect both: when side 2 attacking side 1, and also side 1 attacking side 2.
So what's the problem?Gravitr wrote:This workCode: Select all
if side1 = 1 and side2 = 2 then
That should detect both: when side 2 attacking side 1, and also side 1 attacking side 2.
- Gravitr
- Throwback Developer
- Posts: 236
- Joined: Fri Jul 27, 2012 12:00 pm
- Location: CZ Prague
- Contact:
Re: SAIL - pomoc/help [CZ/EN]
Ah, I didn't know that it works both sides 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)
Show post with download
[MOD] Vsevolod Mission - 4 pro missions
Show post with download
[MP-MOD] Throwback - over 35 new missions
Official site (+download)
- Gravitr
- Throwback Developer
- Posts: 236
- Joined: Fri Jul 27, 2012 12:00 pm
- Location: CZ Prague
- Contact:
Re: SAIL - pomoc/help [CZ/EN]
I've got bug
I have area, which is for materalization (falling) crates. I wrote in sail just "CreateCrates in area".
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
Is here way how to fix it? It doing me only at 1 map.
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:
[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)
Show post with download
[MOD] Vsevolod Mission - 4 pro missions
Show post with download
[MP-MOD] Throwback - over 35 new missions
Official site (+download)
- Gothuk
- Site Administrator
- Posts: 985
- Joined: Tue Sep 04, 2007 6:10 pm
- Location: Poland, Warsaw
- Contact:
Re: SAIL - pomoc/help [CZ/EN]
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.
Edit.
Solved. The problem was with the bad parameters order. The first should be crates amount and second area.
- Gravitr
- Throwback Developer
- Posts: 236
- Joined: Fri Jul 27, 2012 12:00 pm
- Location: CZ Prague
- Contact:
Re: SAIL - pomoc/help [CZ/EN]
Hi, i need (tech_) constant of siberite implosion (mobile bomb), but i cant find it in identify.
[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)
Show post with download
[MOD] Vsevolod Mission - 4 pro missions
Show post with download
[MP-MOD] Throwback - over 35 new missions
Official site (+download)
- Gothuk
- Site Administrator
- Posts: 985
- Joined: Tue Sep 04, 2007 6:10 pm
- Location: Poland, Warsaw
- Contact:
Re: SAIL - pomoc/help [CZ/EN]
http://original-war.net/sailbase.php?di ... roups#i_24
That should be one from
So this is sth from SibContam, SibFiss or SibLoc.
That should be one from
The first 3 are upgrades, Det - Detection, Eng - Engine, Pow - Power.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
So this is sth from SibContam, SibFiss or SibLoc.
- Gravitr
- Throwback Developer
- Posts: 236
- Joined: Fri Jul 27, 2012 12:00 pm
- Location: CZ Prague
- Contact:
Re: SAIL - pomoc/help [CZ/EN]
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.
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)
Show post with download
[MOD] Vsevolod Mission - 4 pro missions
Show post with download
[MP-MOD] Throwback - over 35 new missions
Official site (+download)