Goto https://www.stucuk.netGoto https://www.atlanticaonlinewiki.comGoto https://www.game-requirements.com


Menu


It is currently Sun Dec 17, 2017 3:07 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 59 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
 Post subject: Re: What to do
PostPosted: Sat Feb 19, 2011 5:08 pm 
Offline
Soldier level 0
Soldier level 0

Joined: Mon Mar 15, 2010 6:05 pm
Posts: 41
Location: Leeds / England
Ok, mission nr1 finished, I only need to make "if Gacsam (Kiba before) Tim And Nuclear Paws went into EON - end of mission".
I heard about "Enter Building" but I don't know how to use it on 3 people. Also, when I tried with one there was some error thing.
Code:
On EnterBuilding(Gacsam,Czapa) do
AddMedal('med1',1);

Error is
Quote:
'identifier' expecter but 'czapa' found!

I added identifier to EON which is czapa, but why is it not working?

BTW. How is EON in russian called? Because I am making russian campaign and I don't want to call it EON, but the other thing. (In polish am: EON=EON, ru: EON=CZAPA)

_________________
PL :)


Top
 Profile  
 
 Post subject: Re: What to do
PostPosted: Sat Feb 19, 2011 5:26 pm 
Offline
Moderator
Moderator
User avatar

Joined: Mon Mar 17, 2008 6:03 pm
Posts: 1129
Location: Denmark
"EnterBuilding" is an event which triggers when a human enters any building. It gives two pieces of information on the way: The identifier of the building, which was entered; and the identifier of the human, which entered the building. You use it like this:

Code:
On EnterBuilding(building, human) do

You can put anything as the parameters but not already existing identifiers, global variables and the like. Consider them local variables. That's why the compiler doesn't like if you use your EON's identifier as one of the parameters.

To solve the problem with you having three characters which have to enter the EON before the mission should end, try stacking the identifiers in a list as they enter the EON. When they all appear in the list, end the mission.

IIRC Russians call it TAWAR.

_________________
I have an if that has an else, but that if has another if with an else inside... My question is... If an if has an else, if there is more than one line in that if, should it have a begin and an end?


Top
 Profile  
 
 Post subject: Re: What to do
PostPosted: Sat Feb 19, 2011 6:26 pm 
Offline
Original-War.Net Owner
Original-War.Net Owner
User avatar

Joined: Wed Jan 25, 2006 10:21 am
Posts: 2786
Location: Poland, Białystok
http://wiki.owsupport.com/index.php?title=SAIL_Events
Cough, cough...


Top
 Profile  
 
 Post subject: Re: What to do
PostPosted: Sun Feb 20, 2011 3:49 pm 
Offline
Soldier level 0
Soldier level 0

Joined: Mon Mar 15, 2010 6:05 pm
Posts: 41
Location: Leeds / England
I used a EnterBuilding like this:
Code:
<When thing happens>
begin
ComEnterUnit(Gacsam,EON);
End;

On EnterBuilding(EON,Gacsam) do
begin
ComEnterUnit(Tim_Reed,EON);
end;

On EnterBuilding(EON,Tim_Reed) do
begin
ComEnterUnit(Nuclear_Paws,EON);
wait(10);
<End Of mission, give medals ETC>


1. How many ticks there are in a second?
2.a) If 1$0 is one minute, then 0$45 is 45 seconds right?

_________________
PL :)


Top
 Profile  
 
 Post subject: Re: What to do
PostPosted: Sun Feb 20, 2011 6:55 pm 
Offline
Original-War.Net Owner
Original-War.Net Owner
User avatar

Joined: Wed Jan 25, 2006 10:21 am
Posts: 2786
Location: Poland, Białystok
0) So wrong way.
1) 35
2) Yes.


Top
 Profile  
 
 Post subject: Re: What to do
PostPosted: Sun Feb 20, 2011 8:11 pm 
Offline
Moderator
Moderator
User avatar

Joined: Mon Mar 17, 2008 6:03 pm
Posts: 1129
Location: Denmark
As inspiration, behold how Altar used in American first mission:

Code:
on enterbuilding(b,un) do
  begin
    if b=eon then
      case un of
        john:if not killhim then
          begin
            wait(0$1.3);
            savecharacters(john,'JMM');
            changemap('1','%_cont');
          end
          else begin
            placeunitxy(john,76,34,false);
            comattackunit(others^[off],john);
          end;
        else
          RemoveUnit(un);
      end;
  end;

_________________
I have an if that has an else, but that if has another if with an else inside... My question is... If an if has an else, if there is more than one line in that if, should it have a begin and an end?


Top
 Profile  
 
 Post subject: Re: What to do
PostPosted: Sun Feb 20, 2011 8:24 pm 
Offline
Soldier level 0
Soldier level 0

Joined: Mon Mar 15, 2010 6:05 pm
Posts: 41
Location: Leeds / England
It works. Now, how can I make it like:
1) At the beggining there area "flashing" red like on american mission 1 (after you have teleported through EON)
2) When you get to the area you can see also other team's fog. (I am red, and when I get to area01 I can see my fog and magenta's fog.)
3) When someone dies, other people stop attacking (colours 2 and 3 stop fighting).
4) When you get to area - you see area for a few seconds. Like in american mission 3. When Frank Forsyth shows you enemy's buildings.

@Radzio, what do you mean "so wrong way"? I don't get it... If you could, tell me in polish :D Wielkie THX :P

_________________
PL :)


Top
 Profile  
 
 Post subject: Re: What to do
PostPosted: Sun Feb 20, 2011 8:33 pm 
Offline
Original-War.Net Owner
Original-War.Net Owner
User avatar

Joined: Wed Jan 25, 2006 10:21 am
Posts: 2786
Location: Poland, Białystok
1,2,3,4) See Altar's code.

// PL: "Więc w zły sposób." Odnośnie twojego sposobu użycia eventu.


Top
 Profile  
 
 Post subject: Re: What to do
PostPosted: Wed Feb 23, 2011 8:11 am 
Offline
Soldier level 0
Soldier level 0

Joined: Mon Mar 15, 2010 6:05 pm
Posts: 41
Location: Leeds / England
I am writing to "call" attention. I really need help, please don't jump out with "see altar's code". The problem is, to finish the mission you need 5 (or more vehicles in the area within 1 or more american cargo bays.) There are 10 people, I tried to use it like that, but it does not work.
Code:
Every 0$0001 trigger FilterAllUnits([ [f_side, 3]]) = all do
begin
end;

every 0$1 trigger FilterUnitsInArea(Escape, [[f_side, 3], [f_type, 2], [f_weapon, 12]]) > 1 and FilterUnitsInArea(Escape, [[f_side, 3], [f_type, 2]]) > 5 and FilterUnitsInArea(Escape, [[f_side, 3], [f_type, 1]]) = all do
begin
AddMedal('med1',1);
AddMedal('med2',1);
If FilterAllUnits([ [f_side, 3] [f_alive]]) = 10 then AddMedal('med3',1); // No-One died - Medal
If FilterAllUnits([ [f_side, 3] [f_alive]]) = 9 then AddMedal('med3',2); //One soldier died - Medal
If FilterAllUnits([ [f_side, 3] [f_alive]]) < 9 then AddMedal('med3',-1); // less than 9 people survived no medal.
GiveMedals('Main');
SaveCharacters(Gacsam,'Gac.');
SaveCharacters(r7,'Pokr.');
YouWin;
end;


So the point is. There are ten people. Minimum half of them need to have a vehicle, and minimum one of them have to be a cargo bay. When one human die (or none), you get the medal. If you are left with less than nine, you don't get the medal...

_________________
PL :)


Top
 Profile  
 
 Post subject: Re: What to do
PostPosted: Wed Feb 23, 2011 9:26 am 
Offline
OW Support Owner
OW Support Owner
User avatar

Joined: Wed Dec 28, 2005 11:13 pm
Posts: 4994
Location: UK, Scotland
You have done it so it needs 2 cargo bays and 6 vehicles. > is More than. >= is what you want.

_________________
Image
Free Map Editor - Game Requirements - Stucuk.Net
-Stu


Top
 Profile  
 
 Post subject: Re: What to do
PostPosted: Thu Feb 24, 2011 2:18 pm 
Offline
Soldier level 0
Soldier level 0

Joined: Mon Mar 15, 2010 6:05 pm
Posts: 41
Location: Leeds / England
Stu, that's not the problem. I need a code which makes:
Code:
All red units (except buildings) are in area "escape" and there are more than 5 cars in this area within one or more cargo bay and all cyan units are dead do
give medals etc...

_________________
PL :)


Top
 Profile  
 
 Post subject: Re: What to do
PostPosted: Thu Feb 24, 2011 4:13 pm 
Offline
Moderator
Moderator
User avatar

Joined: Mon Sep 17, 2007 7:34 pm
Posts: 259
Location: Poland, Warsaw
Code:
every 0$1 trigger
FilterUnitsInArea(escape, [ [f_side, 3], [f_or, [f_type, unit_human], [f_type, unit_vehicle] ] ]) = FilterAllUnits( [ [f_side, 3], [f_or, [f_type, unit_human], [f_type, unit_vehicle] ] ] ) // all red units are in the area
and
FilterUnitsInArea(escape, [ [f_side, 3], [f_type, unit_vehicle] ]) > 5 // there are more than 5 vehicles
and
FilterUnitsInArea(escape, [ [f_side, 3], [f_type, unit_vehicle], [f_weapon, us_cargo_bay] ]) >= 1 // there are greater than or equal to 1 cargo bays
and
FilterAllUnits([ [f_side, 4]]) = 0 // there aren't any cyan units.
do
begin
   // ble ble.
end;

_________________
Image


Top
 Profile  
 
 Post subject: Re: What to do
PostPosted: Fri Feb 25, 2011 12:42 pm 
Offline
Soldier level 0
Soldier level 0

Joined: Mon Mar 15, 2010 6:05 pm
Posts: 41
Location: Leeds / England
I don't see any problem, but it's not working...
Have a look - MEGAUPLOAD ----- RAPIDSHARE

_________________
PL :)


Top
 Profile  
 
 Post subject: Re: What to do
PostPosted: Fri Feb 25, 2011 5:39 pm 
Offline
Moderator
Moderator
User avatar

Joined: Mon Mar 17, 2008 6:03 pm
Posts: 1129
Location: Denmark
Considering it's a Russian campaign, I belive "us_cargo_bay" should be "ru_cargo_bay".

_________________
I have an if that has an else, but that if has another if with an else inside... My question is... If an if has an else, if there is more than one line in that if, should it have a begin and an end?


Top
 Profile  
 
 Post subject: Re: What to do
PostPosted: Sun Feb 27, 2011 1:30 pm 
Offline
Soldier level 0
Soldier level 0

Joined: Mon Mar 15, 2010 6:05 pm
Posts: 41
Location: Leeds / England
But: You have got american base in control, so you can only build american cars.

@Refresh + Edit
This is my whole 2nd mission - I will point out the problem. (Coloured yellow)

Quote:
export Gacsam;
export r1,r2,r3,r4,r5,r6,r7,r8,r9,r10;
export a1,a2,a3,mech,a5;
var base;

Function prepare_Gacsam;
begin
uc_side=3;
uc_nation=nation_russian;

hc_name='Gacsam';
hc_class=class_soldier;
hc_sex=sex_male;

hc_attr=[12,11];
hc_basic_skills=[1, 0, 3, 0];
hc_skills=[5, 0, 1, 2];

hc_gallery='Kiba';
hc_face_number = 1;
hc_importance=110;

Gacsam=CreateHuman;
InitHc;
end;

Function prepare_ludzie;
begin
//Russians
uc_side=6;
uc_nation=nation_russian;
hc_name='';
//Snipers
hc_class=class_sniper;
hc_attr=[10,10];
hc_basic_skills=[4, 1, 0, 0];
hc_skills=[4,1,0,0];
hc_importance=80;
r1=CreateHuman;
r2=CreateHuman;
r3=CreateHuman;
r4=CreateHuman;
//Mechanics
hc_class=class_mechanic;
hc_skills=[1,0,4,0];
r8=CreateHuman;
r10=CreateHuman;
//Scientist
hc_class=class_scientistic;
hc_skills=[0,1,0,4];
r9=CreateHuman;
//Soldiers
hc_class=class_soldier;
hc_basic_skills=[3, 0, 0, 0];
r5=CreateHuman;
r6=CreateHuman;
//Main soldier "captain"
hc_gallery='ru';
hc_face_number = 4;
hc_sex=sex_male;
hc_skills=[7, 0, 1, 2];
hc_name='Kpt. Pokryszkin';
r7=CreateHuman;
InitHC;
//Americans
uc_side=4;
uc_nation=nation_american;
hc_name='';
//Soldiers
hc_class=class_soldier;
hc_basic_skills=[3, 0, 0, 0];
hc_skills=[3, 0, 0, 0];
a1=CreateHuman;
a2=CreateHuman;
a3=CreateHuman;
//Mechanics
hc_class=class_mechanic;
hc_skills=[1,0,4,0];
hc_basic_skills=[1, 0, 4, 0];
mech=CreateHuman;
a5=CreateHuman;
end;

every 0$01 trigger IsInArea(Gacsam,Oko) or See(Gacsam,r7) do
begin
// If Gacsam is in area "oko" setside <all magenta> to Red.
ChangeMissionObjectives('C5W');
ChangeSideFog(6,3);
SayRadio(r7,'W'); // Nastepny
Say(R7,'W2');// Ukryj sie na wzgorzu i ogladaj! Od teraz tak bedziesz zyc.
ComMoveXY(Mech,63,61);
AddComMoveXY(Mech,75,61);
AddComMoveXY(Mech,95,76);
ComMoveXY(Gacsam,87,62);
ComStop([r1,r2,r3,r4]);
AddComHold([r1,r2,r3,r4,r7,Gacsam]);
end;

Every 0$01 trigger FilterAllUnits([[f_side, 4],[f_type, unit_human],[f_class, class_mechanic]]) < 2 do
Begin
AddComEnterUnit(r7,Car);
CenterNowOnUnits(Gacsam);
AddComMoveToArea(r7,auto);
CenterNowOnUnits(Gacsam);
AddComMoveToArea([r1,r2,r3,r4],A1234);
CenterNowOnUnits(Gacsam);
AddComExitVehicle(r7);
AddComMoveToArea(r7,P);
CenterNowOnUnits(r7);
AddComMoveToArea(Gacsam,G);
AddComTurnUnit(Gacsam,r7);
AddComEnterUnit([r1,r2,r3],koszar);
AddComChangeProfession([r1,r2,r3,r4],class_soldier);
AddComExitBuilding([r1,r2,r3]);
AddComMoveToArea([r1,r2,r3,r4],A1234);
AddComHold([r1,r2,r3,r4]);
AddComHold([Gacsam,R7]);
end;

Every 0$1 trigger IsInArea(car,auto) do
begin
AddComExitBuilding(r8);
AddComEnterUnit(r8,Car);
AddComRecycle(r8,f1);
end;

Every 0$1 trigger IsInArea(Gacsam,G) and IsInArea(r7,P) do
begin
CenterNowOnUnits([Gacsam,r7]);
Say(R7,'T'); //Pomozecie mi przeprowadzic atak na baze wroga.
Say(Gacsam,'A'); //Tak jest!
Say(R7,'T2'); // Oto ich plany.
RevealFogArea(3, Show);
CenterNowOnXY(20, 10);
wait(0$03);
CenterNowOnXY(48, 17);
wait(0$03);
CenterNowOnXY(40, 28);
wait(0$03);
CenterNowOnUnits(Gacsam);
wait(0$03);
ChangeMissionObjectives('C4');
ChangeMissionObjectives('C2');
wait(0$02);
SetSide(FilterAllUnits([f_side,6]),3);;
InGameOff;
end;

Every 0$1 trigger FilterAllUnits([ [f_side, 4]]) = 0 do
begin
ChangeMissionObjectives('C2W');
ChangeMissionObjectives('C3');
SetAreaMapShow(Escape, 1);
base=true;
end;

//PROBLEM STARTS HERE

every 0$1 trigger FilterUnitsInArea(Escape, [ [f_side, 3], [f_or, [f_type, unit_human], [f_type, unit_vehicle] ] ]) = FilterAllUnits( [ [f_side, 3], [f_or, [f_type, unit_human], [f_type, unit_vehicle] ] ] )
and
FilterUnitsInArea(Escape, [ [f_side, 3], [f_type, unit_vehicle] ]) >= 3
and
FilterUnitsInArea(Escape, [ [f_side, 3], [f_type, unit_vehicle], [f_weapon, us_cargo_bay] ]) >= 1
and
FilterAllUnits([ [f_side, 4]]) = 0 do
begin
AddMedal('med1',1);
AddMedal('med2',1);
If FilterAllUnits([ [f_side, 3] [f_alive]]) = 10 then AddMedal('med3',1);
If FilterAllUnits([ [f_side, 3] [f_alive]]) = 9 then AddMedal('med3',2);
If FilterAllUnits([ [f_side, 3] [f_alive]]) < 9 then AddMedal('med3',-1);
GiveMedals('Main');
SaveCharacters(Gacsam,'Gac.');
SaveCharacters(r7,'Pokr.');
YouWin;
end;


//PROBLEM SHOULD END HERE

Every 0$1 trigger FilterAllUnits([ [f_side, 3], [f_type, 2]]) >= 1 do
begin
ComResearch(l1,tech_OilEng);
end;

Starting
begin
prepare_Gacsam;
prepare_ludzie;
PlaceUnitXY(r1,84,71,false);
PlaceUnitXY(r2,87,73,false);
PlaceUnitXY(r3,88,64,false);
PlaceUnitXY(r4,90,66,false);
PlaceHumanInUnit(r5,b1);
PlaceHumanInUnit(r6,b2);
PlaceUnitXY(r7,90,64,false);
PlaceHumanInUnit(r8,f1);
PlaceHumanInUnit(r9,l1);
PlaceHumanInUnit(r10,f1);
PlaceHumanInUnit(a1,bw1);
PlaceHumanInUnit(a2,bw2);
PlaceUnitXY(a3,30,15,false);
PlaceHumanInUnit(mech,car);
PlaceHumanInUnit(a5,factory);
ComTurnXY(r1,84,67);
ComTurnXY(r2,88,70);
ComTurnXY(r3,85,68);
ComTurnXY(r4,87,69);
ComTurnXY(r7,89,65);
ComHold([r1,r2,r3,r4,r7,a3,mech]);
ComForceInvisible([r1,r2,r3,r4]);
CenterNowOnXY(98,53);
ResetFog;
PlaceUnitArea(Gacsam,Land,true);
CenterNowOnUnits(Gacsam);
wait(20);
Say(Gacsam,'WTHIM');
ChangeMissionObjectives('C1');
ChangeMissionObjectives('C5');
SetLives(Mech,625);
base=false;
end

_________________
PL :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 59 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Original War is an RTS / RPG game by Altar Games
Original War Support is not part of Altar Games but is maintaining Original War for Altar Games

Privacy Policy