Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Winning
Winning [message #232625] Fri, 01 December 2006 11:32 Go to next message
Brandon is currently offline  Brandon
Messages: 282
Registered: August 2006
Location: United States
Karma: 0
Recruit
I'm trying to make the game end using scripts after you destroy either the Nod Turret or GDI Guard Tower, could someone tell me how to setup a script?
Re: Winning [message #232639 is a reply to message #232625] Fri, 01 December 2006 13:46 Go to previous messageGo to next message
Jerad2142 is currently offline  Jerad2142
Messages: 3809
Registered: July 2006
Location: USA
Karma: 6
General (3 Stars)
Okay when you say nod turret do you mean the obelisk or the actual turret, well which ever I will describe both:
If its the Nod Turret use the script "JFW_Death_Send_Custom" the ID will be the ID of an invisible object which I will describe later. For Message use a number (any number will work as long as it matches the next part of this walk through), I am using 45654. And for the Param use 1.

Do the exact same thing for the obelisk.

For the GDI guard tower it is also the same thing but change the message by one number (45655).

Now place an invisible object on you map Get its ID and put it on any "JFW_Death_Send_Custom" scripts you have on the map.
Attach the scripts "JFW_Custom_Send_Custom" to it. For this script have the custom it receives 45654 for nod and 45655 for GDI, For the count GDI will be one, and nod may vari (EX if its only one turret or one obelisk on the map the count would be one, but if its the obelisk and 2 turrets the count will be 3). Make the send Message Different for each team (Ex. NOD 656567, GDI 646466). SendParam will be 1. Send ID will be of another invisible object that I will explain in a second.

And the other scripts will be the script "JFW_Custom_Destroy_Building" the message for this script will be 656567 for NOD. There will be another one of this script for every building on this map. And do the same thing for GDI but the message will be 646466 on each of their scripts.

Finally put one last invisible object on the map, put its ID in the "JFW_Custom_Send_Custom" sendID spot on the other invisible object. This object will only have one script on it "JFW_Reflect_Custom".

I hope this helps you out. If anything confuses you just ask and I will explain it better.


Re: Winning [message #232925 is a reply to message #232625] Mon, 04 December 2006 12:00 Go to previous messageGo to next message
Brandon is currently offline  Brandon
Messages: 282
Registered: August 2006
Location: United States
Karma: 0
Recruit
Could you explain the invisible object stuff please? And do you know how custom scripts work? What's with the custom stuff? Also, if you have time, how do mission objectives and accomplishments work?
Re: Winning [message #232951 is a reply to message #232925] Mon, 04 December 2006 14:32 Go to previous messageGo to next message
Jerad2142 is currently offline  Jerad2142
Messages: 3809
Registered: July 2006
Location: USA
Karma: 6
General (3 Stars)
Okay for the invisible object lets just say it has an id of 988957 (the invisible object is like a vehicle but its physics are set to decoration [on my maps it is a 3d model that can not be seen]). First place this object on your map. Second attach the script "JFW_Reflect_On_Custom" to it. Finally on the script that is called "JFW_Death_Send_Custom" (which is attached to the building nodes) set the ID param to 988957.
And thats all there is to the invisible object (there is only one on your map)!

As for objectives, in my Renhalo mod, I just have it set up so that when it receives a custom it plays a sound using "JFW_2D_Sound_On_Custom" (its something like that). I could help you with this better if you would explain what type of objective was being set off by doing something.


Re: Winning [message #233012 is a reply to message #232625] Tue, 05 December 2006 04:25 Go to previous messageGo to next message
zunnie is currently offline  zunnie
Messages: 2959
Registered: September 2003
Location: Netherlands
Karma: 0
General (2 Stars)

Why are you guys picking such large numbers for sending a msg ?
A message that is sent to a sepific object does not need to be
'globally' unique, just the messages sent to that object must be
unique each. You can send the same message to other objects without
conflicts.

Included an example level which you can load in leveledit to see
how it works..

From the rarpackage place the dds and tga file in your EditorCache
Place the bla.ddb in your presets folder and rename it to temps20.ddb



https://multiplayerforums.com/uploads/monthly_2018_03/TCW2_Signature.png.6236a0dbc6e1e53472a18fe8cd15e47b.png
Re: Winning [message #233018 is a reply to message #233012] Tue, 05 December 2006 07:23 Go to previous messageGo to next message
Jerad2142 is currently offline  Jerad2142
Messages: 3809
Registered: July 2006
Location: USA
Karma: 6
General (3 Stars)
zunnie wrote on Tue, 05 December 2006 04:25

Why are you guys picking such large numbers for sending a msg ?
A message that is sent to a sepific object does not need to be
'globally' unique, just the messages sent to that object must be
unique each. You can send the same message to other objects without
conflicts.

Included an example level which you can load in leveledit to see
how it works..

From the rarpackage place the dds and tga file in your EditorCache
Place the bla.ddb in your presets folder and rename it to temps20.ddb




It depends how big of a level you are making, like if you have hundreds of objects sending customs to all object, or specific, I don't want to take the time to check if I was on 101 yesterday, or 100. But if I was making a simple level I would have customs of 100 or less.


Re: Winning [message #253151 is a reply to message #232625] Sat, 07 April 2007 22:08 Go to previous messageGo to next message
Brandon is currently offline  Brandon
Messages: 282
Registered: August 2006
Location: United States
Karma: 0
Recruit
I know it's been awhile and this post is old as the dead but I stopped getting TSRP's so I never knew there were more replies, now that I looked I read zunnie's stuff and now I understand how custom scripts work. That stuff is nice! A little complex because there's alot to link up but it's nice work! Thanks all. Big Ups
Re: Winning [message #253216 is a reply to message #253151] Sun, 08 April 2007 22:43 Go to previous messageGo to next message
Jerad2142 is currently offline  Jerad2142
Messages: 3809
Registered: July 2006
Location: USA
Karma: 6
General (3 Stars)
So you figured it all out?
If so good.


Re: Winning [message #253799 is a reply to message #232625] Thu, 12 April 2007 23:14 Go to previous message
Brandon is currently offline  Brandon
Messages: 282
Registered: August 2006
Location: United States
Karma: 0
Recruit
Yes I did, thanks all.
Previous Topic: screen shot please
Next Topic: Still Crashing!
Goto Forum:
  


Current Time: Thu Nov 14 06:10:58 MST 2024

Total time taken to generate the page: 0.00929 seconds