 |
|  |
 |
|
The Big Mc
|
 |
Of the universe / England
Oct 2001 time: 05:18
|
|
I have opened this thread on the behalf of lacutos
Well the past few weeks I have been very busy on my scenario and in my scenario I have a unit called a siren (named after the ones who killed ships with there call in ancient mythology)
And I was trying to make some new orders so here is my first one
code: HandleEvent(AssassinateRulerOrder) 'supertremer' pre
{
location_t tmploc; // killsallland
int_t i;
int_t tmpplayer;
city_t tmpcity;
int_t tmpcitypop;
int_t T;
int_t numunits;
unit_t tmpUnit;
GetCityByLocation(location[0], tmpcity);
numUnits = GetUnitsAtLocation(tmpcity.location);
for (i = 0; i < numUnits; i = i + 1) { // Kill all units
GetUnitFromCell(tmpcity.location, i, tmpUnit);
Event: DisbandUnit(tmpUnit);//should kill all units don’t work so good
}
AddEffect(location[0], "SPECEFFECT_CREATE_PARKS", "SOUND_ID_NANO_TERROR");
tmpplayer = tmpcity.owner;
Event:Killcity(tmpcity, 0, tmpplayer);
Terraform(location[0], 23); // Transform the city into sea
for (i = 0; i < 7; i = i + 1) {
t=i-1;
GetNeighbor(city[0].location, t, tmpLoc);
Terraform(tmploc, 23); // Transform sea
}
return STOP;
}
its called super tremor which basically kills an enemy city and replaces it with a lake
it’s a work in progress and the one I have at home has evolved a bit more
the only problem is with the disbanding of units and if there is a river there
it basically hijacks the old assassinate order which I did not use much all you basically have to do after this is change the assassinate special effect and pics (using the read zfs program)
so locutos what do you think of that
|
|
|  |
 |
|
Immortal Wombat
|
 |
in perpetuity
Dec 2000 time: 05:18
|
|
Well now...
Firstly I would suggest using KillUnit(tmpUnit) instead of DisbandUnit. Disband only works if you own the unit I would think.
Up to there should then be fine.
Then in Event:Killcity(tmpcity, 0, tmpplayer); I think the integer in the middle woud be the city index, not sure. Try -1 to make sure the capitol doesn't get wasted by accident.
Terraforming the city tile, is that shallow water or beach?
Lastly, this for loop is a bit confused/confusing
code:
for (i = 0; i < 7; i = i + 1) {
t=i-1;
GetNeighbor(city[0].location, t, tmpLoc);
Terraform(tmploc, 23); // Transform sea
}
return STOP;
Why not do a loop in t?
code:
for(t=0; t < 8; t = t + 1){
There are 8 tiles around the city, numbered 0 to 7, so that loop will get them all. Then use GetNeighbor, and Terraform.
Is the return STOP necessary to prevent the ruler actually being assassinated?
|
|
|  |
 |
|  |
 |
|
Pedrunn
|
 |
of Natal, Brazil
Jul 2001 time: 02:18
|
|
Really cool idea!!!!!
Rush Improvement
Like workers of civ3, while a tile improvement is being buit, you could geta a unit to stand over the imp and use this order wich will cost PWs (or money) to have the tile imp ready in the next turn. See IW's rush tile improvements code.
Last edited by Pedrunn on 19-04-2002 at 18:26
|
|
|  |
All times are GMT. The time now is 05:18. Apolyton Time is 00:18. |
top of page
|
| archivepost |
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|