Gameanater
  • Gameanater
  • 55.5% (Neutral)
  • General Topic Starter
12 years ago
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.
Any old friends still on here can add me on discord @jcdenton2187. I'm far more likely to respond there.
Sponsor
Annihilationzh
12 years ago
You have to change it's locomotor. The first one in the file able to cross water is BasicAmphibiousLocomotor.
If you need help, post in the forum. You'll get help a lot faster than if you send me a PM.

I reject all buddy requests. I don't think 'buddy' needs to be made official. It's not like you're marrying me.
precision_bomber
12 years ago
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.
Death Label:
Reduced back to 3 main factions(and a couple of extras).
Each faction can choose a(or all of them) tech-tree via General's Powers.
Angel Wings: Jets and Anti-Air, Helicopters and Missiles, Hovercraft and Lasers
Red Skulls: Armor Division, Mecha Armada, Drone Swarm
Earth's Saviors: Air Raid, Homeworld Security, Stealth
Gameanater
  • Gameanater
  • 55.5% (Neutral)
  • General Topic Starter
12 years ago

You have to change it's locomotor. The first one in the file able to cross water is BasicAmphibiousLocomotor.

Originally Posted by: Annihilationzh 


Thanks, AZH. 😄

Just a little bit of extra info.

After changing the Locomotor to 'BasicAmphibiousLocomotor'.

You'll notice that the CIA Officer is walking on water.

Originally Posted by: precision_bomber 


Grr. :banghead:

If you want it to [actually] swim, you'll have to create a swimming animation for it..

Originally Posted by: precision_bomber 


: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).

Then Add "OVER_WATER" ConditionStates.

Originally Posted by: precision_bomber 


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. 😁 Hope you enjoy the map when I eventually finish i! 😎


Any old friends still on here can add me on discord @jcdenton2187. I'm far more likely to respond there.
Gameanater
  • Gameanater
  • 55.5% (Neutral)
  • General Topic Starter
12 years ago
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:


;=====================================================
;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
;=====================================================


Any old friends still on here can add me on discord @jcdenton2187. I'm far more likely to respond there.
CommieDog
12 years ago
Unless you're omitting it, you haven't actually changed the CIA Officer's locomotor.
UserPostedImage 
CommieDog: Because someone has to do your dirty work for you
Gameanater
  • Gameanater
  • 55.5% (Neutral)
  • General Topic Starter
12 years ago

Unless you're omitting it, you haven't actually changed the CIA Officer's locomotor.

Originally Posted by: CommieDog 



Doh! I figured out the mistake, and it was such an obvious mistake, to!:banghead:
But now, I have a new problem! 😞 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
Any old friends still on here can add me on discord @jcdenton2187. I'm far more likely to respond there.
precision_bomber
12 years ago
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:

Documents/Command and Conquer Generals Zero Hour Data

Death Label:
Reduced back to 3 main factions(and a couple of extras).
Each faction can choose a(or all of them) tech-tree via General's Powers.
Angel Wings: Jets and Anti-Air, Helicopters and Missiles, Hovercraft and Lasers
Red Skulls: Armor Division, Mecha Armada, Drone Swarm
Earth's Saviors: Air Raid, Homeworld Security, Stealth
Annihilationzh
12 years ago
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.
If you need help, post in the forum. You'll get help a lot faster than if you send me a PM.

I reject all buddy requests. I don't think 'buddy' needs to be made official. It's not like you're marrying me.
Gameanater
  • Gameanater
  • 55.5% (Neutral)
  • General Topic Starter
12 years ago

First off, I don't get the structure of your code.

Originally Posted by: precision_bomber 


What do you mean? Is it not very readable or something?

Second. Run it through Worldbuilder, and see the error, or, check CrashReleaseInfo.txt on your:

Documents/Command and Conquer Generals Zero Hour Data

Originally Posted by: precision_bomber 


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.


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.

Originally Posted by: Annihilationzh 


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...
Any old friends still on here can add me on discord @jcdenton2187. I'm far more likely to respond there.
CommieDog
12 years ago
I see what the problem is: you're trying to post the entire locomotor's code into the object. You only need the name:
Object AmericaInfantryCIAOfficer
Locomotor = BasicAmphibiousLocomotor
End

UserPostedImage 
CommieDog: Because someone has to do your dirty work for you
Annihilationzh
12 years ago

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...

Originally Posted by: Annihilationzh 


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.

I see what the problem is: you're trying to post the entire locomotor's code into the object. You only need the name:


Locomotors are linked to the AIUpdate, and they must always be specified together.

Object AmericaInfantryCIAOfficer
 RemoveModule ModuleTag_03
 AddModule ModuleTag_03
  Behavior = AIUpdateInterface ModuleTag_03_Override
    AutoAcquireEnemiesWhenIdle = Yes
  End
 End
 Locomotor = SET_NORMAL BasicAmphibiousLocomotor
End
I just found these code tags that don't remove spaces. Very handy!

EDIT: I copied CommieDog's mistake of missing SET_NORMAL. FIXED.
If you need help, post in the forum. You'll get help a lot faster than if you send me a PM.

I reject all buddy requests. I don't think 'buddy' needs to be made official. It's not like you're marrying me.
menard
  • menard
  • 50.25% (Neutral)
  • Major
6 years ago
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.
Users browsing this topic