View Full Version : Creating Passenger Spaces in units
ErAzAnGeL
02-23-2003, 01:17 PM
I'm managed to siphon the code from the Chinese APC thing and applied it to my Crusaders and Paladins. Here we go...
In the FactionUnit.ini put this set of code in the behaviour section as module 10:
Behavior = TransportContain ModuleTag_10
PassengersAllowedToFire = Yes
Slots = 1
InitialPayload = AmericaInfantryRanger 1
ScatterNearbyOnExit = No
HealthRegen%PerSec = 10
DamagePercentToUnits = 10%
AllowInsideKindOf = INFANTRY
ExitDelay = 250
NumberOfExitPaths = 3 ; Defaults to 1. Set 0 to not use ExitStart/ExitEnd, set higher than 1 to use ExitStart01-nn/ExitEnd01-nn
GoAggressiveOnExit = Yes ; AI Will tell people to set their mood to Aggressive on exiting
End
When built, the unit will contain one Ranger.
Now, in CommandSet.ini under the CrusaderTankCommandSet insert two new things:
CommandSet AmericaTankCrusaderCommandSet
1 = Command_ConstructAmericaVehicleBattleDrone
2 = Command_ConstructAmericaVehicleScoutDrone
3 = Command_TransportExit
4 = Command_Evacuate
9 = Command_AttackMove
11 = Command_Guard
12 = Command_Stop
End
3 and 4 enable the tank to show the contained trooper and deploy the trooper if necessary. Try raising the cost of the tank to make it fairer...
That is all. :|
Phoib
02-24-2003, 03:58 PM
In the FactionUnit.ini put this set of code in the behaviour section as module 10:
Please note, that if you have a custom vehicle, and want to add this yourself: Make sure, real sure, that there are no double ModuleTag_XX's, (where XX can be any integer between 01 and 99) otherwise, you can't get the game to start!
Behavior = TransportContain ModuleTag_10
PassengersAllowedToFire = Yes
Slots = 1
InitialPayload = AmericaInfantryRanger 1
ScatterNearbyOnExit = No
HealthRegen%PerSec = 10
DamagePercentToUnits = 10%
AllowInsideKindOf = INFANTRY
ExitDelay = 250
NumberOfExitPaths = 3 ; Defaults to 1. Set 0 to not use ExitStart/ExitEnd, set higher than 1 to use ExitStart01-nn/ExitEnd01-nn
GoAggressiveOnExit = Yes ; AI Will tell people to set their mood to Aggressive on exiting
End
When built, the unit will contain one Ranger.
Now, in CommandSet.ini under the CrusaderTankCommandSet insert two new things:
CommandSet AmericaTankCrusaderCommandSet
1 = Command_ConstructAmericaVehicleBattleDrone
2 = Command_ConstructAmericaVehicleScoutDrone
3 = Command_TransportExit
9 = Command_Evacuate
10 = Command_AttackMove
11 = Command_Guard
12 = Command_Stop
End
To have more then one trooper, add as many (Italic) Command_TransportExit as there are (Underlined) slots, so with slots = 6 you'll have 3 till 8 as Command_TransportExit.
ErAzAnGeL
02-24-2003, 05:56 PM
Thanks Phoib, i realise that could have been misinterpreted.
Sponge
02-26-2003, 12:47 AM
AT LAST!!
The last part of that (CommandSet stuff) had been a continual stumbling block for me. Thanks for posting that so no one else will end up overlooking the obvious. Perhaps Deezire could post this in the tutorials section?
Phoib
02-26-2003, 09:35 AM
It will be featured in DZ's tutorials, but only after the community is ready for it.
Currently, nobody really understands the way the code is made, save DZ, RV and Flyby. (Flyby gave everyone a perfect hint though!)
Only AFTER you understand the principles of object orientated programming, one can begin to write new stuff.
ErAzAnGeL
02-26-2003, 12:19 PM
That is very true, i'm currently having an absolute nightmare implementing the new (what i call) SecretService unit... Blast the damned ini's!
Oh, and bugger the damn skins too!
Phoib
02-26-2003, 02:20 PM
Start small.
Don't try to make a 1337 unit the minute you open the ini's.
You fail. You fail misserably. Horribly. :devil:
ErAzAnGeL
02-26-2003, 03:24 PM
Nothings managed to go horribly bastard-like yet, however i do have the current problem of every change i make creating "serious errors". I mean, fuck, could they not have made an output file to locate the problem of the 'error'?
Phoib
02-26-2003, 04:27 PM
Searchest these forums, and thy prayers shall be answered :angel:
Reddenz
02-27-2003, 10:57 AM
sorry for that nub question,
but where do i find this *.ini files, because i searched several times through the generals data files, but found nothing :(.
thx for answering my question.
greetz
main_concept
02-27-2003, 11:33 AM
they're in the INI.big. u need a BIG viewer to open them.
http://xccu.sourceforge.net/
Reddenz
02-27-2003, 11:49 AM
great thx.
now i can go on with my modells, :D
warlord
04-02-2003, 02:35 PM
How can I make a helicopter a transport helicopter and have 5 slots like the humvees have. I can create the heli able to carry a passenger where you select infantry then click on the heli but the heli wont land for the troops like the chinook. How do I get the heli to land like the chinook does?
CopyKat
04-02-2003, 03:01 PM
How can I make a helicopter a transport helicopter and have 5 slots like the humvees have. I can create the heli able to carry a passenger where you select infantry then click on the heli but the heli wont land for the troops like the chinook. How do I get the heli to land like the chinook does?
Hint: behaviors and locomotors are used to get a Chinook to do stuff like that (to my knowledge that is...haven't exposed the Chinook to that much research...yet...)...
Flyby
04-03-2003, 04:16 AM
Currently, nobody really understands the way the code is made, save DZ, RV and Flyby. (Flyby gave everyone a perfect hint though!)
Not sure why you add me to that list, Phoib ?? :tard:
I certainly don't have the amount of knowledge DZ or RV (or several other ppl) have. Especially as they have a 10 to 12 month learning advantage, as they were alpha/beta testers.
Phoib
04-03-2003, 06:00 AM
You gave me the answer to the code thanks to your comparrison between the code and lego blocks, a while ago.
I think it's THE perfect way to see object-orientated programming, and since the Generals ini's are object orientated :rolleyes:
Powered by vBulletin® Version 4.1.8 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.