Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Destroy a Building after X Amount of Time
Destroy a Building after X Amount of Time [message #469300] Thu, 14 June 2012 17:51 Go to next message
Sn1per74* is currently offline  Sn1per74*
Messages: 939
Registered: April 2006
Karma: 0
Colonel
Hey Guys,
I'm working on an attack and defend map on the M00_Tutorial Level. I replaced all of the controllers and such with the multiplayer ones and even have the weapons factory creating vehicles. However, I need the NOD base to be destroyed if GDI defends their base long enough. The only way I could think of doing this is destroying the NOD controllers exactly one second before the game would normally end. So, is there a script that will destroy and object after a specified amount of time?
Thanks


http://i4.photobucket.com/albums/y133/FMAROCKS/sniper74halosigsnipedontforgettogiv.png
Creator: AoBFrost
Re: Destroy a Building after X Amount of Time [message #469309 is a reply to message #469300] Thu, 14 June 2012 22:14 Go to previous messageGo to next message
Xpert is currently offline  Xpert
Messages: 1588
Registered: December 2005
Location: New York City
Karma: 0
General (1 Star)
If all you're doing is giving GDI a victory, then why not just use a timer that will force win GDI (sort of like the FDS console command "WIN")

http://i32.photobucket.com/albums/d42/XpertMaverick/xpertyankee.jpg

Creator of NetGuard, an IRC network regulator.
Developer of the CloudyServ 0.982-X project.
Developer of the CloudyServ Ren-X bot.

Part time streamer - https://twitch.tv/gg_wonder
Re: Destroy a Building after X Amount of Time [message #469310 is a reply to message #469300] Thu, 14 June 2012 22:30 Go to previous messageGo to next message
Distrbd21 is currently offline  Distrbd21
Messages: 743
Registered: September 2008
Karma: 0
Colonel

Try getting hold of jonwil and ask him how some of his scripts work.

Here is one but I don't know exactly how it works.

JFW_Custom_Destroy_All_Buildings
or maybe.
JFW_Delay_Custom with JFW_Damaged_Send_Custom_Amount or JFW_Damaged_Send_Custom


Live Your Life Not Some one Else's.| Sharing Is Caring

http://dsgaming.us/distrbd21/Distrbd21%20siggy.png

Cookie Jar

Suicide
Re: Destroy a Building after X Amount of Time [message #469313 is a reply to message #469310] Thu, 14 June 2012 23:52 Go to previous messageGo to next message
Sn1per74* is currently offline  Sn1per74*
Messages: 939
Registered: April 2006
Karma: 0
Colonel
Zunnie created a script for me (z_timer_destroy_object) that kills an object after a certain amount of time. I just set the parameter as 1790 seconds (29 minutes and 50 seconds for those mathematically challlenged) and it destroys the buildings controllers. Worked like a charm Big Ups

He said it would be included in the next set of scripts to be released- for future reference.


http://i4.photobucket.com/albums/y133/FMAROCKS/sniper74halosigsnipedontforgettogiv.png
Creator: AoBFrost

[Updated on: Thu, 14 June 2012 23:53]

Report message to a moderator

Re: Destroy a Building after X Amount of Time [message #469316 is a reply to message #469300] Fri, 15 June 2012 00:47 Go to previous messageGo to next message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
Zunnie should check if a given script exists before creating pointless duplicates.


JFW_Destroy_Self_Timer

Attach to an object, it destroys itself after a set number of seconds.

Alternatively you could also have used
JFW_Timer_Destroy_Building
or
JFW_Timer_Destroy_Object

But those would require extra parameters and thus the first would be most suitable for attaching directly to the building controller.



It's no wonder we end up with zillions of scripts in LevelEdit when people can't be bothered having a quick look at whats available and just re-implement it for no good reason.


http://steamsignature.com/card/1/76561197975867233.png
Re: Destroy a Building after X Amount of Time [message #469318 is a reply to message #469316] Fri, 15 June 2012 03:23 Go to previous messageGo to next message
Distrbd21 is currently offline  Distrbd21
Messages: 743
Registered: September 2008
Karma: 0
Colonel

danpaul88 wrote on Fri, 15 June 2012 02:47


It's no wonder we end up with zillions of scripts in LevelEdit when people can't be bothered having a quick look at whats available and just re-implement it for no good reason.

Thumbs Up
Thumbs Up


Live Your Life Not Some one Else's.| Sharing Is Caring

http://dsgaming.us/distrbd21/Distrbd21%20siggy.png

Cookie Jar

Suicide
Re: Destroy a Building after X Amount of Time [message #469327 is a reply to message #469300] Fri, 15 June 2012 05:19 Go to previous messageGo to next message
kamuixmod is currently offline  kamuixmod
Messages: 211
Registered: July 2010
Karma: 0
Recruit
We might need more detailed Information about each script to prevent such things to happen

http://img46.imageshack.us/img46/5836/kmauixsignature.png
Re: Destroy a Building after X Amount of Time [message #469328 is a reply to message #469300] Fri, 15 June 2012 05:48 Go to previous messageGo to next message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
Which is why I have started writing detailed documentation for scripts, but there are a lot of them to get through.

To be fair though, in this instance, a ctrl+f for 'Destroy' in the list of scripts would turn up all three of those possibilities.



It also doesn't help that far too many of the scripts we have are written for a very specific purpose with very little flexibility, hence the proliferation of 'base defence with VTOL, without VTOL, with infantry, without infantry, with stealth, without stealth etc etc etc etc etc' type scripts. There's no reason those couldn't all have been combined into a single script with parameters to determine what it can shoot at (and, as a matter of fact, I did exactly that with dp88_AI_Turret).


http://steamsignature.com/card/1/76561197975867233.png

[Updated on: Fri, 15 June 2012 05:50]

Report message to a moderator

Re: Destroy a Building after X Amount of Time [message #469333 is a reply to message #469328] Fri, 15 June 2012 09:13 Go to previous messageGo to next message
Distrbd21 is currently offline  Distrbd21
Messages: 743
Registered: September 2008
Karma: 0
Colonel

danpaul88 wrote on Fri, 15 June 2012 07:48

Which is why I have started writing detailed documentation for scripts, but there are a lot of them to get through.

To be fair though, in this instance, a ctrl+f for 'Destroy' in the list of scripts would turn up all three of those possibilities.



It also doesn't help that far too many of the scripts we have are written for a very specific purpose with very little flexibility, hence the proliferation of 'base defence with VTOL, without VTOL, with infantry, without infantry, with stealth, without stealth etc etc etc etc etc' type scripts. There's no reason those couldn't all have been combined into a single script with parameters to determine what it can shoot at (and, as a matter of fact, I did exactly that with dp88_AI_Turret).


I can help you out with the scripts I've done a hole hell of a lot of them in LE, back when I started Ren.


Live Your Life Not Some one Else's.| Sharing Is Caring

http://dsgaming.us/distrbd21/Distrbd21%20siggy.png

Cookie Jar

Suicide
Re: Destroy a Building after X Amount of Time [message #469338 is a reply to message #469300] Fri, 15 June 2012 10:04 Go to previous messageGo to next message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
To help you decide which script is best to use I have added and compiled documentation for all three of the scripts I mentioned earlier. Any of them would meet your objectives I believe.

JFW_Destroy_Self_Timer


JFW_Timer_Destroy_Object


JFW_Timer_Destroy_Building


http://steamsignature.com/card/1/76561197975867233.png
Re: Destroy a Building after X Amount of Time [message #469345 is a reply to message #469338] Fri, 15 June 2012 11:28 Go to previous message
Sn1per74* is currently offline  Sn1per74*
Messages: 939
Registered: April 2006
Karma: 0
Colonel
Thanks! I appreciate the help. Thumbs Up

http://i4.photobucket.com/albums/y133/FMAROCKS/sniper74halosigsnipedontforgettogiv.png
Creator: AoBFrost
Previous Topic: test to see if something stands in an object
Next Topic: Tiberian Technologies Special Collisions
Goto Forum:
  


Current Time: Sat Nov 23 23:18:38 MST 2024

Total time taken to generate the page: 0.01659 seconds