Posted by: Gameanater - Wednesday, May 29, 2013 7:11:04 PM
I want to make the American CIA officer able to swim. I know it's possible because I've seen in happen in a map, but I couldn't find the code for it.
Also, how do i change the display name of an object? I tried, but it crashed the game whenever I tried to load the map.
Posted by: Annihilationzh - Wednesday, May 29, 2013 7:24:00 PM
You have to change it's locomotor. The first one in the file able to cross water is BasicAmphibiousLocomotor.
Posted by: precision_bomber - Thursday, May 30, 2013 6:48:43 AM
Just a little bit of extra info.
After changing the Locomotor to 'BasicAmphibiousLocomotor'.
You'll notice that the CIA Officer is walking on water.
If you want it to swim, you'll have to create a swimming animation for it.
Then Add "OVER_WATER" ConditionStates.
Posted by: Gameanater - Thursday, May 30, 2013 5:57:40 PM
[quote=Annihilationzh;128288]You have to change it's locomotor. The first one in the file able to cross water is BasicAmphibiousLocomotor.[/quote]
Thanks, AZH. [smile]
[quote=precision_bomber;128297]Just a little bit of extra info.
After changing the Locomotor to 'BasicAmphibiousLocomotor'.
You'll notice that the CIA Officer is walking on water.[/quote]
Grr. :banghead:
[quote=precision_bomber;128297]If you want it to [actually] swim, you'll have to create a swimming animation for it..[/quote]
:banghead: Is there a way to make him just look like he's walking in the water? Because all of the water in my map is supposed to be very shallow (shallow enough to walk on the ground).
[quote=precision_bomber;128297]Then Add "OVER_WATER" ConditionStates.[/quote]
Hmm, interesting. I'm not entirely sure I know how to do that, but I might have seen code for that somewhere.
Thanks for the help, guys. [grin] Hope you enjoy the map when I eventually finish i! [sunglasses]
Posted by: Gameanater - Friday, May 31, 2013 9:15:27 PM
It's not working, or I'm not typing the code in correctly, the CIA Agent still can't get into (or onto) the water.
This is all of the code for him I have so far:
[/quote]
;=====================================================
;Paul Wayne
;=====================================================
;For some reason, this code doesn't work, the buttons don't even show up!
;Which is why I also did not bother to add the "modules" for the special abilities,
;The buttons should show up grayed-out as-is, but they don't.
CommandSet AmericaInfantryCIAOfficerCommandSet
1 = Command_ChinaInfantryTankHunterTNTAttack
2 = Demo_Command_ConstructGLADemoTrap
3 = Chem_Command_ConstructGLADemoTrap
End
;Special thanks to AnnailationZH
Locomotor = BasicAmphibiousLocomotor
Surfaces = GROUND RUBBLE WATER
Speed = 50 ;45
SpeedDamaged = 45 ;38
TurnRate = 350
TurnRateDamaged = 300
Acceleration = 500 ;100
AccelerationDamaged = 250 ;50 ; in dist/(sec^2)
Braking = 150 ; in dist/(sec^2)
MinTurnSpeed = 0 ; in dist/sec
ZAxisBehavior = NO_Z_MOTIVE_FORCE
Appearance = TWO_LEGS
StickToGround = Yes ; walking guys aren't allowed to catch huge (or even small) air.
End
;=====================================================
;End Paul Wayne
;=====================================================
[/quote]
Posted by: CommieDog - Friday, May 31, 2013 10:03:57 PM
Unless you're omitting it, you haven't actually changed the CIA Officer's locomotor.
Posted by: Gameanater - Wednesday, June 5, 2013 5:38:12 PM
[quote=CommieDog;128321]Unless you're omitting it, you haven't actually changed the CIA Officer's locomotor.[/quote]
Doh! I figured out the mistake, and it was such an obvious mistake, to!:banghead:
But now, I have a new problem! [sad] I fixed the mistake (I think), but now it crashes the game with a "fatal error"! :banghead: *Bangs head of keyboard 3000 times) How do I fix this?
My code:
;Special thanks to AnnailationZH and Commie Dog
Object AmericaInfantryCIAOfficer
Locomotor = BasicAmphibiousLocomotor
Surfaces = GROUND RUBBLE WATER
Speed = 50 ;45
SpeedDamaged = 45 ;38
TurnRate = 350
TurnRateDamaged = 300
Acceleration = 500 ;100
AccelerationDamaged = 250 ;50 ; in dist/(sec^2)
Braking = 150 ; in dist/(sec^2)
MinTurnSpeed = 0 ; in dist/sec
ZAxisBehavior = NO_Z_MOTIVE_FORCE
Appearance = TWO_LEGS
StickToGround = Yes ; walking guys aren't allowed to catch huge (or even small) air.
End
Posted by: precision_bomber - Thursday, June 6, 2013 7:09:17 AM
First off, I don't get the structure of your code.
Second. Run it through Worldbuilder, and see the error, or, check CrashReleaseInfo.txt on your:
[code=cpp]Documents/Command and Conquer Generals Zero Hour Data[/code]
Posted by: Annihilationzh - Thursday, June 6, 2013 4:31:24 PM
You need to learn how to INI code. You got lucky by copying Beng's code, but if you really want to code properly, you have to learn.
Posted by: Gameanater - Thursday, June 6, 2013 7:36:44 PM
[quote=precision_bomber;128402]First off, I don't get the structure of your code.[/quote]
What do you mean? Is it not very readable or something?
[quote=precision_bomber;128402]Second. Run it through Worldbuilder, and see the error, or, check CrashReleaseInfo.txt on your:
[code=cpp]Documents/Command and Conquer Generals Zero Hour Data[/code][/quote]
Well, opened up the map in World Builder, but I got no error messages. BUT, I did check Crashrelease info.txt and saw what caused the crash, it says "Release Crash at Wed Jun 05 16:35:12 2013
; Reason Error parsing INI file 'c:\users\nathan\documents\command and conquer generals zero hour data\maps\battle with the mob\map.ini' (Line: 'Object AmericaInfantryCIAOfficer ')
Last error:
Current stack:"
So I guess I made a typo on that line, I'll try and fix it at some future point.
[quote=Annihilationzh;128404]You need to learn how to INI code. You got lucky by copying Beng's code, but if you really want to code properly, you have to learn.[/quote]
Yeah, I do. I really want to learn how. Any help with that would be much appreciated.
Thank you, everyone for your help, and I'm sorry if any of these questions seem stupid or silly, I'm just really, really new to .ini coding...
Posted by: CommieDog - Friday, June 7, 2013 1:37:38 AM
I see what the problem is: you're trying to post the entire locomotor's code into the object. You only need the name:[code]Object AmericaInfantryCIAOfficer
Locomotor = BasicAmphibiousLocomotor
End[/code]
Posted by: Annihilationzh - Friday, June 7, 2013 9:47:54 AM
[quote=Annihilationzh;128404]You need to learn how to INI code. You got lucky by copying Beng's code, but if you really want to code properly, you have to learn.
Yeah, I do. I really want to learn how. Any help with that would be much appreciated.
Thank you, everyone for your help, and I'm sorry if any of these questions seem stupid or silly, I'm just really, really new to .ini coding...[/quote]
Don't start with Map.inis. Try modding the game itself, and experimenting. It's much more forgiving and you'll have better debugging software.
[quote]I see what the problem is: you're trying to post the entire locomotor's code into the object. You only need the name:[/quote]
Locomotors are linked to the AIUpdate, and they must always be specified together.
[code=java]Object AmericaInfantryCIAOfficer
RemoveModule ModuleTag_03
AddModule ModuleTag_03
Behavior = AIUpdateInterface ModuleTag_03_Override
AutoAcquireEnemiesWhenIdle = Yes
End
End
Locomotor = SET_NORMAL BasicAmphibiousLocomotor
End[/code]
I just found these code tags that don't remove spaces. Very handy!
EDIT: I copied CommieDog's mistake of missing SET_NORMAL. FIXED.
Posted by: menard - Thursday, October 31, 2019 8:03:26 AM
hi im back this is my problem cause i make a tanya with animation i got successfully animate her swim but if you stop it into specific direction she walk over water even i apply those code.I had prepare create all bones and skin with my own using 3dsmax but still no luck to run perfectly in Generals.