Jump to content


Photo

Capturing structures


  • Please log in to reply
4 replies to this topic

#1 Chachalon

Chachalon
  • Members
  • 28 posts
  • Projects:Burning Sky for C&C Tiberian Wars (just some storywriting & concept drawings...)

Posted 27 April 2006 - 12:20 PM

FInally, long time past since my last post here :blink: . I already posted this in other forums, but as this one seems to be the most active by far, why not post it here since someone might be able to use this...

While working on my mod, I thought it might make sense for players to be able to capture hostile resource-buildings rather than destroying them. I tried to get the flag-method (the one used for Inns, Outposts etc) to work and failed... and then suddenly had the idea to make the farms garrisonable and allow enemies inside. This way you can send infantry units in there just like into towers, and once they are in, the building is captured. There are only two things you have to do to make this possible:
- Add GARRISONABLE and GARRISONABLE_UNTIL_DESTROYED (not sure if the last one is really needed) to the KindOf-list of the building
- Add this block below:

Behavior = HordeGarrisonContain ModuleTag_hordeGarrison
ObjectStatusOfContained = UNSELECTABLE CAN_ATTACK ENCLOSED
ContainMax = 1; This handles how many batallions can be inside the strucutre at a time
DamagePercentToUnits = 0%
PassengerFilter = GENERIC_FACTION_GARRISONABLE
AllowEnemiesInside = Yes; This allows units to capture the building
AllowAlliesInside = Yes
AllowNeutralInside = No
AllowOwnPlayerInsideOverride = Yes
NumberOfExitPaths = 1
PassengerBonePrefix = PassengerBone:ARROW_ KindOf:INFANTRY
EntryOffset = X:50.0 Y:0.0 Z:0.0
EntryPosition = X:35.0 Y:0.0 Z:0.0
ExitOffset = X:75.0 Y:0.0 Z:0.0
End

You can also leave the "CAN_ATTACK" out if you don't want archers to be able to shoot from inside the building.
I also found out that if you move your units out again the building will be given back to the original owner. And for buildings which are not meant to be garrisoned (towers should need nothing more than changing "AllowEnemiesInside" switched from No to Yes) one might want to add a "Command_ExitGarrison" to the commandset.

Edited by Chachalon, 27 April 2006 - 12:20 PM.


#2 Hostile

Hostile

    Benefitting Humanity Simply by Showing Up!

  • Veterans
  • 9,551 posts
  • Location:Washington DC
  •  T3A Founder
  • Division:Revora
  • Job:Global Administrator
  • Donated
  • Association

Posted 27 April 2006 - 04:02 PM

That's pretty clever, nice work.

#3 Bart

Bart

  • Network Admins
  • 8,524 posts
  • Location:The Netherlands
  • Division:Revora
  • Job:Network Leader

Posted 27 April 2006 - 07:12 PM

what about adding CAPTURABLE to their KindOf?
bartvh | Join me, make your signature small!
Einstein: "We can’t solve problems by using the same kind of thinking we used when we created them."

#4 Chachalon

Chachalon
  • Members
  • 28 posts
  • Projects:Burning Sky for C&C Tiberian Wars (just some storywriting & concept drawings...)

Posted 27 April 2006 - 07:53 PM

Like for the flag from inns? I tried, it didn't work... if it did for you I must have done something wrong...

#5 Bart

Bart

  • Network Admins
  • 8,524 posts
  • Location:The Netherlands
  • Division:Revora
  • Job:Network Leader

Posted 27 April 2006 - 10:37 PM

you could try to add TECH_BUILDING too (got that from generals)
bartvh | Join me, make your signature small!
Einstein: "We can’t solve problems by using the same kind of thinking we used when we created them."




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users