and c:
Announcement
Collapse
No announcement yet.
Hidden Nationality SLICable?
Collapse
X
-
Rather than event 'Battle' you could try using some of the movement-related events to get the Barb unit to attack in the same turn: when CtP2 was still under development and Harlan suggested MAD as addition to the game, Mr Ogre told us that that was possible because at that time, units couldn't move outside their own turn. A few days later he reported MAD would be implemented after all since he had found a way to make units move outside their own turn. That might be key here: he may have created a new event that made units move without checking if this was legal. There are many movement related events in the game, so if you try some of these to get the unit to move into the square that should be attacked, that *might* just work...
Comment
-
This is the original news topic might be of some interest
[QUOTE](8 July 2000, 09:34 | CtP2) That's right! CTP2 is going to model Mutually Assured Destruction! Here's what Mr. Ogre announced on our forums
We now have a system for targeting and then auto-launching nukes when you get nuked in the main game. I had said we weren't doing anything new for nukes, but I was wrong, we are, it's in and working.
There's still a whole lot more in that monster Nuke thread that we're not doing, but this one "little" thing is pretty cool.
If only we had one of those alpha(?) builds to see this in action... [QUOTE]
Now whatever happened to that idea i wonder? Any thoughts on weather it would be good to implement IF it could be done? And gives some backup that there is code there that could be put to use for the privateer but how????
SMIFFGIGOxygen should be considered a drug
Tiberian Sun Retro
My Mod for Tiberian Sun Webmaster of
http://www.tiberiumsun.com
Comment
-
Code://MoveUnits(army_t, location_t, location_t) //An army always moves on this event, no more legality checks at this point //MADLaunch(unit_t) //SetTarget(unit_t, city_t) Give a nuclear missile (unit) a target //TargetOrder(army_t, location_t) Give a nuclear missile a target //INT CreateCity(owner, nearlocation, distance[, savecity])
The second one always gives me a serious error in the ctp.exe while executing no matter how I try. E.g I tried to just create a city at that spot to use settarget. That's all events/functions I could find in the documentation. In the NuclearWar scenario there's a function calledCode:TargetNuclearAttack(1, 2, 1)
Edit: Made the post a little narrower...Last edited by mapfi; September 9, 2002, 07:52.
Comment
-
Played with other possibilities too, e.g. my own battle deciding algorithm. I had to use the unitrecord variable for accessing the defense value of a unit but somehow the code doesn't work exactly the way I want it yet. Has anybody any experiences with unitrecord array?
Comment
-
Here is the Elite Unit code wich uses the unitrecord array.
Background: This makes code makes a unit only buildable by a civ that dicovered an advance and got luck ina 1/6 random number.
Our CTP2 version of unique units.Attached Files"Kill a man and you are a murder.
Kill thousands and you are a conquer.
Kill all and you are a God!"
-Jean Rostand
Comment
-
Originally posted by mapfi
Thanks Pedrunn. Seems like I used it the correct way then.
Off the Thread-Topic: Is this code included in any particular mod? I find the refugee bit pretty attractive.
So play MedPack if you want to see this in action.
-MartinCiv2 military advisor: "No complaints, Sir!"
Comment
-
MedMod does have both codes included. But the file isnt from there since I am using it in my owns modifications. The Refugee came as bonus since i was toolazy to take it off. I am glady you liked my laziness consequences though.Last edited by Pedrunn; September 9, 2002, 10:53."Kill a man and you are a murder.
Kill thousands and you are a conquer.
Kill all and you are a God!"
-Jean Rostand
Comment
-
Here's what I've tried now:Code:HandleEvent(EntrenchOrder) 'PrivateerAttack' pre { unit_t tmpUnit; unit_t tmpUnit2; army_t tmpArmy; army_t tmpArmy2; location_t tmpLocation; location_t tmpLocation2; int_t i; int_t k; int_t end; int_t factor; int_t factor2; tmpLocation = army[0].location; if (UnitsInCell(tmpLocation) == 1) { GetUnitFromCell(tmpLocation, 0, tmpUnit); if (tmpUnit.type == UnitDB(UNIT_LONGSHIP)) { while (i <= 7 && end == 0) { GetNeighbor(tmpLocation, i, tmpLocation2); if(TerrainType(tmpLocation2) >= 10 && TerrainType(tmpLocation2) <= 17) { k = UnitsInCell(tmpLocation2); if (k == 1) { GetUnitFromCell(tmpLocation2, 0, tmpUnit2); if (tmpUnit2.owner != tmpUnit.owner && tmpUnit2.owner != 0) { unitrecord[0] = tmpUnit2.type; factor = tmpUnit2.hp*unitrecord[0].Defense; factor2 = tmpUnit.hp*30; if (factor2 > (factor*2) / 3) { KillUnit(tmpUnit2); } elseif (factor2 < factor2 / 3) { KillUnit(tmpUnit); } else { DamageUnit(tmpUnit, 5); DamageUnit(tmpUnit2, 5); } end = 1; } } } i = i + 1; } } } return STOP; }
Comment
-
Originally posted by mapfi
factor = tmpUnit2.hp*unitrecord[0].Defense;
Code:factor = tmpUnit2.hp*UnitDB(tmpUnit.type).Defense;
Comment
-
Tried and had no luck - it will still execute once and only once - there must be some other flaw we didn't spot. I took out the unitrecord but now I'm not sure if it wouldn't have worked after all. Locutus did you just not see the assigning lign and it should work after all? Even if, that's not what's going wrong in this thingie. The temp variables in this handler are reinitialized each time for sure, aren't they?! What else could it be???
Comment
-
Originally posted by mapfi
The temp variables in this handler are reinitialized each time for sure, aren't they?! What else could it be???
-MartinCiv2 military advisor: "No complaints, Sir!"
Comment
Comment