Goto http://www.stucuk.netGoto http://www.atlanticaonlinewiki.comGoto http://www.battleswarmcommunity.comGoto http://www.game-requirements.comGoto http://www.occasionalramblings.com


Menu


It is currently Fri Sep 10, 2010 2:36 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Carrying resources, BuildingStarted
PostPosted: Sun Jan 17, 2010 11:48 am 
Offline
Soldier level 4
Soldier level 4
User avatar

Joined: Wed Nov 01, 2006 2:04 pm
Posts: 368
Location: Poland, Wrocław
The question is... how to make (with SAIL) a unit carry oil barrels for one depot to a point on the map and then drop it?


Last edited by Gwrhkhsh on Fri Jan 22, 2010 2:22 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 17, 2010 12:45 pm 
Offline
Moderator
Moderator
User avatar

Joined: Mon Sep 17, 2007 7:34 pm
Posts: 190
Location: Poland, Nur
dropping:
Code:
ComUnload(units:plist)
list of units receives cargo unload command


taking resource from depot:
Code:
ComTransport(units:plist, un:integer, mattype:integer)
list of units receives transport command

_________________
Image
Image


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 17, 2010 2:24 pm 
Offline
Soldier level 4
Soldier level 4
User avatar

Joined: Wed Nov 01, 2006 2:04 pm
Posts: 368
Location: Poland, Wrocław
Thanks, I couldn't find that.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 22, 2010 2:23 pm 
Offline
Soldier level 4
Soldier level 4
User avatar

Joined: Wed Nov 01, 2006 2:04 pm
Posts: 368
Location: Poland, Wrocław
Sorry for double posting, I didn't want to make a new thread. How to use "BuildingStarted" event? It has two parameters, what do they require?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 22, 2010 3:54 pm 
Offline
Soldier level 4
Soldier level 4
User avatar

Joined: Mon Mar 17, 2008 6:03 pm
Posts: 350
Location: Denmark
Code:
BuildingStarted(building,builder)

building - identifier of building started
builder - identifier of unit which started construction of the building


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 22, 2010 5:23 pm 
Offline
Soldier level 4
Soldier level 4
User avatar

Joined: Wed Nov 01, 2006 2:04 pm
Posts: 368
Location: Poland, Wrocław
So why doesn't that work:

Code:
on BuildingStarted(build, builder) do
begin

      if build=b_oil_power then
         begin
                if GetResourceVisibility(54, 11, 3)>0 then
                   begin
                          CenterOnXY(54, 11);
                          DialogueOn;

                          Say(r1_sci1, 'den-sci-1b');
                          DialogueOff;

                          ChangeMissionObjectives('OOil1');
                   end
                else
                   begin
                          CenterOnUnits([Zelenyuk,r1_sci1]);
                          DialogueOn;

                          Say(r1_sci1, 'den-sci-1a');
                          case Query('QEnergy') of
                               1: begin
                                         Say(Zelenyuk, 'den-zel-1a');
                                         SayRadio(Koneev, 'den-kon-1a');
                                         CarryTheOil;  // <- a previously declared function.
                                  end;
                               2: Say(Zelenyuk, 'den-zel-1b');
                          end;

                          DialogueOff;

                          ChangeMissionObjectives('OOil2');
                   end;
         end;
end;


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 22, 2010 6:27 pm 
Offline
VAP - Very Active Person
VAP - Very Active Person
User avatar

Joined: Wed Jan 25, 2006 10:21 am
Posts: 1712
Location: Poland, Bialystok
Because 'building' is actually a building in meaning of unit. If you want to compare it to type then GetBType xD
Code:
if GetBType(building) = b_oil_power


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 22, 2010 6:35 pm 
Offline
Soldier level 4
Soldier level 4
User avatar

Joined: Wed Nov 01, 2006 2:04 pm
Posts: 368
Location: Poland, Wrocław
Aaah, I understand. Thanks.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 0 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