Home » Renegade Discussions » Mod Forum » Hello
Re: Hello [message #326423 is a reply to message #326420] |
Wed, 16 April 2008 10:45 |
|
reborn
Messages: 3231 Registered: September 2004 Location: uk - london
Karma:
|
General (3 Stars) |
|
|
SSnipe wrote on Wed, 16 April 2008 13:27 |
reborn wrote on Wed, 16 April 2008 10:03 |
SSnipe wrote on Wed, 16 April 2008 12:53 |
reborn wrote on Wed, 16 April 2008 07:54 | Not that I know of, but you could edit the ssgm_player script so that all the drop weapons code is also added to the ::Destroyed event, and add a little explosion at the same position as the player GameObject *.
|
i looked at the scripts...i think i understand some of what u said but just a little stuck
|
ATM the drop weapon code is on the ::Killed event (I think, working from memory here ), change it so that it is on the ::Destroyed event of SSGM_Player instead. This way when a player leaves it will happen too. You will also have to create an explosion too, this won't be too much extra work as the drop weapon already gets the Vector position for where to crate the weapon drop, so just use that position for the explosion too.
|
so pretty much chage that thing and replace the weapon drops with an explossion? or add a explosion along with weapon drop?
the killed event has no wep drop stuff :S
heres what i think i made problley 99.9% junk but im trying
void MDB_SSGM_Player::Destroyed(GameObject *obj) {
if (Settings->DestroyPlayerVeh && Get_Vehicle(obj)) {
GameObject *Veh = Get_Vehicle(obj);
if (Get_Vehicle_Driver(Veh) == obj) {
Commands->Apply_Damage(Veh,99999,"Death",false);
}
}
if (!Data->Mod && Settings->DropWeapons && WasKilled) {
WasKilled = false;
Vector3 DeathPlace = Commands->Get_Position(obj);
int RandomNum = Commands->Get_Random_Int(1,5);
GameObject *BackpackScript = 0;
if (strstr(Commands->Get_Preset_Name(obj),"CnC_GDI_MiniGunner_0")) {
BackpackScript = Commands->Create_Object("POW_AutoRifle_Player",DeathPlace);
Commands->Create_Explosion(Get_Parameter("ag_braxis_large.w3d"),Commands->Get_Position(obj),0);
}
]
}
|
Oh, it's on the ::Destroyed event already. I guess it should drop then, I wonder why it doesn't.
Let me look...
Ah. You need to change a line from this:
if (!Data->Mod && Settings->DropWeapons && WasKilled) {
To this:
if (!Data->Mod && Settings->DropWeapons) {
Which basically means it will drop his weapons if he was killed or left the server, instead of only dropping if he is killed.
For the explosion you need to add this line here:
(note you need to use some explosion name in that parameter there.
Commands->Create_Explosion("some explosion name here",DeathPlace,0);
You will need to add it here:
else {
BackpackScript = Commands->Create_Object("POW_Armor_025",DeathPlace);
}
Commands->Attach_Script(BackpackScript,"MDB_SSGM_Drop_Weapon","");
}
// Add the line here SSnipe and then remove this comment
if (Find_My_Veh(obj)) {
Commands->Send_Custom_Event(obj,Find_My_Veh(obj),1111,0,0);
}
}
That will mean an explosion happens when any player is killed or leaves at the place they died or was when they left.
If you want it to only expload if they drop a weapon you would need to add that line under all the instances in that event where you see "BackpackScript = Commands->Create_Object etc etc etc".
|
|
|
|
|
Hello
By: _SSnipe_ on Mon, 14 April 2008 22:20
|
|
|
Re: Hello
By: bisen11 on Tue, 15 April 2008 16:39
|
|
|
Re: Hello
By: reborn on Wed, 16 April 2008 07:54
|
|
|
Re: Hello
By: _SSnipe_ on Wed, 16 April 2008 09:53
|
|
|
Re: Hello
By: reborn on Wed, 16 April 2008 10:03
|
|
|
Re: Hello
By: _SSnipe_ on Wed, 16 April 2008 10:27
|
|
|
Re: Hello
By: reborn on Wed, 16 April 2008 10:45
|
|
|
Re: Hello
By: _SSnipe_ on Wed, 16 April 2008 12:28
|
|
|
Re: Hello
By: reborn on Wed, 16 April 2008 12:48
|
|
|
Re: Hello
By: _SSnipe_ on Wed, 16 April 2008 14:40
|
|
|
Re: Hello
|
|
|
Re: Hello
By: _SSnipe_ on Wed, 16 April 2008 14:52
|
Goto Forum:
Current Time: Thu Jan 23 23:40:28 MST 2025
Total time taken to generate the page: 0.00862 seconds
|