|
|
|
View unanswered posts | View active topics
|
Page 1 of 1
|
[ 8 posts ] |
|
| Author |
Message |
|
Gwrhkhsh
|
Post subject: Carrying resources, BuildingStarted Posted: Sun Jan 17, 2010 11:48 am |
|
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 |
|
 |
|
Gothuk
|
Post subject: Posted: Sun Jan 17, 2010 12:45 pm |
|
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
_________________

|
|
| Top |
|
 |
|
Gwrhkhsh
|
Post subject: Posted: Sun Jan 17, 2010 2:24 pm |
|
Joined: Wed Nov 01, 2006 2:04 pm Posts: 368 Location: Poland, Wrocław
|
|
Thanks, I couldn't find that.
|
|
| Top |
|
 |
|
Gwrhkhsh
|
Post subject: Posted: Fri Jan 22, 2010 2:23 pm |
|
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 |
|
 |
|
McBenn
|
Post subject: Posted: Fri Jan 22, 2010 3:54 pm |
|
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 |
|
 |
|
Gwrhkhsh
|
Post subject: Posted: Fri Jan 22, 2010 5:23 pm |
|
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 |
|
 |
|
Radzio
|
Post subject: Posted: Fri Jan 22, 2010 6:27 pm |
|
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 |
|
 |
|
Gwrhkhsh
|
Post subject: Posted: Fri Jan 22, 2010 6:35 pm |
|
Joined: Wed Nov 01, 2006 2:04 pm Posts: 368 Location: Poland, Wrocław
|
|
Aaah, I understand. Thanks.
|
|
| Top |
|
 |
|
Page 1 of 1
|
[ 8 posts ] |
|
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
|
|
|