Home » Renegade Discussions » Mod Forum » Various scripting and modding questions
Various scripting and modding questions [message #313278] |
Thu, 24 January 2008 00:19 |
|
GEORGE ZIMMER
Messages: 2605 Registered: March 2006
Karma: 0
|
General (2 Stars) |
|
|
Since I generally have questions I'd like to ask here and there but don't feel like making a bunch of topics, I'll just make one and post them here.
So, time to ask.
------------------------------------
1- Script zones and music
I'm wondering if there's a script that can play music upon the entry of a script zone, and can change the current music to another track if you enter another script zone. If the music file is the same upon entry, it won't restart it or anything.
I'm sort of making a single player map, so even if it plays for everyone, that'd be alright with me. Though, it would be better if it started only for the player who enters the script zone.
And, in the event that the player dies, I'd like to make a script zone in the spawn area that'd turn off music- Or some sort of way to stop music once the player dies.
------------------------------------
2- Bosses and end-game-if-killed units
I know it's possible to attach a building controller to a certain unit- However, I don't really know how to do this. I've seen it in various co-op missions online where if you kill a boss character, it'd say something like "Hand of Nod destroyed" or some random building.
Or, even better, is it possible to make a unit end the game if killed? Perhaps even have a controller of sorts check if multiple units are alive (Multiple bosses, or multiple mission critical units you have to protect). If all the units specified are killed, then it'd gameover in favor of the opposing team.
So say you kill 3 Nod bosses as GDI, GDI would win. And if Nod kills GDI bosses, it'd gameover for Nod.
------------------------------------
3- AI management
Well, I seem to have some trouble with AI, and directing them to do what I want.
To be more specific, basically if anyone shoots, the AI in the entire map go into combat mode and all that. It also seems like they can see through objects.
What I would like, is for an AI unit to stay where it is until it ACTUALLY sees you.
So let's say I have a bot right around the corner in a corridor. I want the bot to only attack the player once the player goes around that corner. Otherwise, I want it to stay where it was spawned, and doesn't move around.
I WOULD make them stationary, but I want them to move once they see the player.
Because normally, the bot just walks around freely and does whatever, and can see/hear the player magically. I turned off listener scale, but then they became really dumb and don't really do anything when they're shot even, except crouch down. The only time they run towards you is if you're right in front of them.
------------------------------------
That's about all I got for now. I'll add more later on.
Toggle SpoilerScrin wrote on Sat, 24 January 2009 13:22 |
cAmpa wrote on Sat, 24 January 2009 12:45 | Scrin, stop pming people to get the building bars.
|
FUCK YOU AND THIS SHIT GAME WITH YOUR SCRIPTS!!! I HAVE ASKING YOU AND ANOTHER NOOBS HERE ABOUT HELP WITH THAT BUILDING ICONS FEATURES FOR YEARS, BUT YOU KEEP IGNORING ME AND KEEP WRITE SHIT, SO BURN YOU AND YOUR ASSLICKERS FRIENDS, THIS TIME I'M NOT COME BACK!!!!!!!!!
|
|
|
|
|
Re: Various scripting and modding questions [message #313353 is a reply to message #313278] |
Thu, 24 January 2008 14:45 |
|
Veyrdite
Messages: 1471 Registered: August 2006 Location: Australia, Sydney
Karma: 0
|
General (1 Star) |
|
|
z_console_input_killed
Attach that to an object with the settings time 0 and then destroy it preferably using a custom. This will cause the team with the highest score to win. Or if you do have building controllers you could put in win 1 for GDI to win or win 0 for nod
EDIT:
Jerad Gray wrote on Fri, 25 January 2008 04:01 |
TDA_Send_Custom_Zone
|
I never new there was a TDA_ script for it, I always used JFW_Zone_Send_Custom_Cost
WOL: Veyrdite Previously: Dthdealer ( a long time ago )
[Updated on: Thu, 24 January 2008 14:47] Report message to a moderator
|
|
|
|
Re: Various scripting and modding questions [message #313380 is a reply to message #313371] |
Thu, 24 January 2008 17:26 |
Genesis2001
Messages: 1397 Registered: August 2006
Karma: 0
|
General (1 Star) |
|
|
Scrin wrote on Thu, 24 January 2008 16:51 |
Cabal8616 wrote on Thu, 24 January 2008 01:19 | Since I generally have questions I'd like to ask here and there but don't feel like making a bunch of topics, I'll just make one and post them here.
So, time to ask.
------------------------------------
1- Script zones and music
I'm wondering if there's a script that can play music upon the entry of a script zone, and can change the current music to another track if you enter another script zone. If the music file is the same upon entry, it won't restart it or anything.
.
|
your tracks must be in .wav format.
|
not really, no. I've heard about people using snda with *.mp3 files for MP3 players ingame. ^,^
~Zack
|
|
|
Re: Various scripting and modding questions [message #313395 is a reply to message #313380] |
Thu, 24 January 2008 18:29 |
|
Jerad2142
Messages: 3811 Registered: July 2006 Location: USA
Karma: 6
|
General (3 Stars) |
|
|
.mp3 or .wav
void TDA_Send_Custom_Zone::Entered(GameObject *obj,GameObject *enter)
{
if (CheckPlayerType(enter,Get_Int_Parameter("Team_ID")))
return;
GameObject *object = Commands->Find_Object(Get_Int_Parameter("ID"));
int message;
int param;
message = Get_Int_Parameter("EnterMessage");
param = Get_Int_Parameter("EnterParam");
if (message)
{
if (!param)
{
param = Commands->Get_ID(enter);
}
Commands->Send_Custom_Event(obj,object,message,param,0);
}
}
void TDA_Send_Custom_Zone::Exited(GameObject *obj,GameObject *exit)
{
if (CheckPlayerType(exit,Get_Int_Parameter("Team_ID")))
return;
GameObject *object = Commands->Find_Object(Get_Int_Parameter("ID"));
int message;
int param;
message = Get_Int_Parameter("ExitMessage");
param = Get_Int_Parameter("ExitParam");
if (message)
{
if (!param)
{
param = Commands->Get_ID(exit);
}
Commands->Send_Custom_Event(obj,object,message,param,0);
}
}
Visit Jerad's deer sweat shop
|
|
|
Goto Forum:
Current Time: Tue Nov 26 10:10:26 MST 2024
Total time taken to generate the page: 0.00622 seconds
|