:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::

Do you want to advertise at Project Perfect Mod. Find out how to do it HERE.

The time now is Tue Sep 29, 2020 3:27 am
All times are UTC + 0
 Forum index » Modding Central » C&C: Remastered Collection Editing Forums
How to make the oil pump capturable
Moderators: Global Moderators
Post new topic   Reply to topic Page 1 of 1 [3 Posts] View previous topic :: View next topic
Author Message
jonwil
Grenadier


Joined: 24 Jul 2005

PostPosted: Thu Aug 13, 2020 1:26 am    Post subject:  How to make the oil pump capturable Reply with quote

I figured out how to make the TD oil pump civilian building (as seen in the attached image) into something you can capture that will give you credits (like the oil derricks in Red Alert 2 and Red Alert 3).

Changes I made in the source code to make it work:
Changed "Can this building be captured?" and "Is this building un-sellable?" to true in bdata.cpp for building v19.

Added TCountDownTimerClass PumpTime; to BuildingClass to handle the pump time.

Added PumpTime = 0; to the BuildingClass constructor

Added code to BuildingClass::Captured to set the pump time when the building is captured.

Added code to BuildingClass::AI to handle granting the credits.

The time between grants is set by TICKS_PER_SECOND * 10 (10 being how many seconds) and the credits to grant is the 20 in Refund_Money(20)

The same changes should work in Red Alert as well to add capturable oil derricks to that game although you will need to change rules.ini and add "Capturable=true" and "Unsellable=true" to the [V19] section instead of changing bdata.cpp


v19.png
 Description:
 Filesize:  30.6 KB
 Viewed:  178 Time(s)

v19.png



PumpTest.7z
 Description:

Download
 Filename:  PumpTest.7z
 Filesize:  403.62 KB
 Downloaded:  6 Time(s)


Back to top
View user's profile Send private message
Nyerguds
General


Joined: 24 May 2004
Location: Flanders (Be) Posts:300000001

PostPosted: Thu Aug 13, 2020 9:13 am    Post subject: Reply with quote

Do you also have a fix for removing the flame spout animation when repairing it? Someone asked me about that a while ago.
_________________

Back to top
View user's profile Send private message Visit poster's website Skype Account
jonwil
Grenadier


Joined: 24 Jul 2005

PostPosted: Thu Aug 13, 2020 9:38 am    Post subject: Reply with quote

I dont know where that's comming from.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [3 Posts] View previous topic :: View next topic
 Forum index » Modding Central » C&C: Remastered Collection Editing Forums
Jump to:  
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
Quick Reply
Username:


If you are visually impaired or cannot otherwise answer the challenges below please contact the Administrator for help.


Write only two of the following words separated by a sharp: Brotherhood, unity, peace! 

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.1179s ][ Queries: 13 (0.0063s) ][ Debug on ]