|
|
|
Re: [Plug-in] SSGM2.02 Commander BETA [message #397676 is a reply to message #383383] |
Wed, 12 August 2009 00:34 |
|
reborn
Messages: 3231 Registered: September 2004 Location: uk - london
Karma: 0
|
General (3 Stars) |
|
|
If you have limited coding experiance, I would suggest you just change the cinematic files called Nod_Supply.txt and GDI_Supply.txt.
I would remove the part that attaches the "reb_supply_crate" script, and instead make it drop off a tank.
If you are feeling braver, then search through Commander.ccp in the source that's part of the download, and then amend the chat hook that calls this function, and the other scripts that are used in the chat hook.
|
|
|
|
Re: [Plug-in] SSGM2.02 Commander BETA [message #397684 is a reply to message #383047] |
Wed, 12 August 2009 03:03 |
Vaati19
Messages: 50 Registered: April 2009 Location: Sweden
Karma: 0
|
Recruit |
|
|
Is this correct?
void Triggered(int ID,const TokenClass &Text,int ChatType) {
GameObject *object = Get_GameObj(ID);
if(GDICommander[ID] || NodCommander[ID]){
if(GDICommander[ID]){
if(GDIDropActive){
if(GDITeamFund >= CSettings->supplycost){
GDITeamFund = GDITeamFund - CSettings->supplycost;
//Create the supply drop here
Commands->Create_2D_WAV_Sound("m00evag_dsgn0063i1evag_snd.wav");
Vector3 position = Commands->Get_Position(object);
GameObject *flare = Commands->Create_Object("Invisible_Object",position);
Commands->Set_Model(flare,"ag_sigflare_gld");
Commands->Attach_Script(flare,"Test_Cinematic","GDI_MedDrop.txt");
GDIDropActive = false;
GameObject *dropsetter = Commands->Create_Object("Invisible_Object",Vector3(0.0f,0.0f,0.0f));
Commands->Attach_Script(dropsetter,"reb_GDI_drop_setter","");
}
else{
Console_Input(StrFormat("ppage %d you do not have enough money in the Team Fund to order a tank drop.",ID).c_str());
}
}
else{
Console_Input(StrFormat("ppage %d The \"!meddrop\" command is not available yet. It can be used every %i seconds",ID,CSettings->droptimer).c_str());
}
}
else if(NodCommander[ID]){
if(NodDropActive){
if(NodTeamFund >= CSettings->supplycost){
NodTeamFund = NodTeamFund - CSettings->supplycost;
//Create the supply drop here
//mx0_trooper1_112.wav
Commands->Create_2D_WAV_Sound("m00evag_dsgn0063i1evag_snd.wav");
Vector3 position = Commands->Get_Position(object);
GameObject *flare = Commands->Create_Object("Invisible_Object",position);
Commands->Set_Model(flare,"ag_sigflare_gld");
Commands->Attach_Script(flare,"Test_Cinematic","Nod_LightDrop.txt");
NodDropActive = false;
GameObject *dropsetter = Commands->Create_Object("Invisible_Object",Vector3(0.0f,0.0f,0.0f));
Commands->Attach_Script(dropsetter,"reb_Nod_drop_setter","");
}
else{
Console_Input(StrFormat("ppage %d you do not have enough money in the Team Fund to order a tank drop.",ID).c_str());
}
}
else{
Console_Input(StrFormat("ppage %d The \"!lightdrop\" command is not available yet. It can be used every %i seconds",ID,CSettings->droptimer).c_str());
}
}
}
else{
Console_Input(StrFormat("ppage %d You are not a team commander and cannot use this command.",ID).c_str());
}
}
};
ChatCommandRegistrant<TankChatCommand> TankChatCommandReg("!meddrop;!mediumtank;!medtank;!mediumtankdrop;!lightdrop;lighttank;!lighttankdrop;!light;!med",CHATTYPE_ALL,0,GAMEMODE_ALL);
|
|
|
Re: [Plug-in] SSGM2.02 Commander BETA [message #397688 is a reply to message #383047] |
Wed, 12 August 2009 04:46 |
|
reborn
Messages: 3231 Registered: September 2004 Location: uk - london
Karma: 0
|
General (3 Stars) |
|
|
You could hard code the cost of the drop if you wanted to do that in there yes.
Specifically here:
if(GDITeamFund >= CSettings->supplycost){
GDITeamFund = GDITeamFund - CSettings->supplycost;
You would change it to this for example if you wanted it to cost 2000 credits:
if(GDITeamFund >= 2000){
GDITeamFund = GDITeamFund - 2000;
However, the cost of the drop has been set up to be a configurable option in the .ini file supplied in the download.
You seem to be getting the hang of this, for someone who claims to not be able to code, you've done well!
You do realise you need to compile this code, don't you?
[Updated on: Wed, 12 August 2009 04:46] Report message to a moderator
|
|
|
|
|
Re: [Plug-in] SSGM2.02 Commander BETA [message #397693 is a reply to message #383047] |
Wed, 12 August 2009 05:45 |
|
reborn
Messages: 3231 Registered: September 2004 Location: uk - london
Karma: 0
|
General (3 Stars) |
|
|
I guess you opened them in notepad or something?
Basically, what you should be doing is opening the solution file (.sln). This file opens with visualstdio.net2005 (which you need to install).
You can find out how to install a free version here: http://www.renegadeforums.com/index.php?t=msg&th=26642&start=0&rid=3 415
Using visual studio, you can browse the relevant .ccp and .h files allot easier. Once you have made your changes and you are happy with them (you seem to do done this already), you can compile the source code (hit f5). This will then produce the compiled .dll file in the working folder of the source code.
|
|
|
|
Re: [Plug-in] SSGM2.02 Commander BETA [message #397700 is a reply to message #383047] |
Wed, 12 August 2009 06:19 |
|
reborn
Messages: 3231 Registered: September 2004 Location: uk - london
Karma: 0
|
General (3 Stars) |
|
|
Probably, but not without some adjustments. I have never actually tried.
Your questions, whilst welcome, are probably becoming irrelevant to the topic at hand now, you may wish to start your own modding topic if you need more help. You're starting to go at a tangent now...
|
|
|
|
Re: [Plug-in] SSGM2.02 Commander BETA [message #399899 is a reply to message #383047] |
Wed, 26 August 2009 13:43 |
|
reborn
Messages: 3231 Registered: September 2004 Location: uk - london
Karma: 0
|
General (3 Stars) |
|
|
Version 1.3 is now available, which should address the crash bug.
I was using a function that someone else wrote, the function assumed that all base game objects where actually scriptable game objects, but they are not. This fix came about from a problem on the APB server, and I ported the fix quickly to this plug-in too. So it isn't tested, but I can say with a fair degree of certainty that this should fix the problem.
Many thanks to Ghostshaw for providing some insight into this annoying problem.
http://spencerelliott.co.uk/downloads.html
|
|
|
|
|