Command and Conquer: Renegade Official Forums - RDF feed
type: channel
description: C&C: Renegade --> Dying since 2003™, resurrected in 2024!
items: Code/Source Request Crates
items: Re: Code/Source Request Crates

Code/Source Request Crates
type: item
description: Many thx to Reborn and Hex for there source release on several crates. Crate code release on request from EA-DamageEverything. gmmain.cpp ///////////////////////// ///////////////////////// //Electromagnetic Pulse// ///////////////////////// ///////////////////////// void reb_Electromagnetic_pulse::Created(GameObject *obj) { Commands->Set_Rain(10.0f,3.5f,true); Commands->Set_Wind(0.7f,2.0f,1.0f,3.5f); char empstormmsg[128]; char empstormmsg2[128]; Commands->Create_2D_WAV_Sound("m00evag_dsgn0069i1evag_snd.wav"); sprintf(empstormmsg,"msg Warning!!!"); Console_Input(empstormmsg); sprintf(empstormmsg2,"msg Electromagnetic Pulse approaching..."); Console_Input(empstormmsg2); Commands->Start_Timer(obj,this,3.0f,1); Commands->Start_Timer(obj,this,4.0f,2); Commands->Start_Timer(obj,this,4.7f,3); Commands->Start_Timer(obj,this,14.7f,4); Commands->Start_Timer(obj,this,15.7f,5); Commands->Start_Timer(obj,this,16.7f,6); Commands->Start_Timer(obj,this,17.7f,7); Commands->Start_Timer(obj,this,18.7f,8); Commands->Start_Timer(obj,this,19.7f,9); Commands->Start_Timer(obj,this,20.4f,10); Commands->Start_Timer(obj,this,21.4f,11); Commands->Start_Timer(obj,this,22.0f,12); Commands->Start_Timer(obj,this,23.0f,13); Commands->Start_Timer(obj,this,23.6f,14); Commands->Start_Timer(obj,this,24.2f,15); Commands->Start_Timer(obj,this,24.8f,16); Commands->Start_Timer(obj,this,25.4f,17); Commands->Start_Timer(obj,this,26.6f,18); Commands->Start_Timer(obj,this,27.2f,19); Commands->Start_Timer(obj,this,28.2f,20); Commands->Start_Timer(obj,this,28.8f,21); Commands->Start_Timer(obj,this,29.6f,22); Commands->Start_Timer(obj,this,30.2f,23); Commands->Start_Timer(obj,this,31.2f,24); Commands->Start_Timer(obj,this,42.2f,25); } void reb_Electromagnetic_pulse::Timer_Expired(GameObject *obj, int number) { char empstormmsg[128]; if(number == 1){ Commands->Create_2D_WAV_Sound("m00evag_dsgn0097i1evag_snd.wav"); } if(number == 2){ Commands->Create_2D_WAV_Sound("m00evag_dsgn0076i1evag_snd.wav"); } if(number == …
creator: wittebolx
date: 2008-04-07T21:41:41-00:00

Re: Code/Source Request Crates
type: item
description: Ok this is a C++ Thread, Nice Code, anyways Clients need Scripts 2.* to use this Function. It Displays the Purchase terminal, NOT the Sidebar. Enjoy: // !PCT class PCTframeChatCommand : public ChatCommandClass { void Triggered(int ID,const TokenClass &Text,int ChatType) { GameObject *obj = Get_GameObj(ID); if(Get_Object_Type(obj) == 0) { Display_NOD_Player_Terminal_Player(obj); } else if(Get_Object_Type(obj) == 1) { Display_GDI_Player_Terminal_Player(obj); } } }; ChatCommandRegistrant<PCTframeChatCommand> PCTframeChatCommandReg("!pct",CHATTYPE_ALL, 0, GAMEMODE_ALL);
creator: mrãçķz
date: 2008-04-07T22:09:05-00:00

Re: Code/Source Request Crates
type: item
description: Many thanks to you Witte for the code. Unfortunately, using it by following the instruction causes the script-based crates to mess up. The EMP scripts, the power down and the kamikaze won't work. EDIT= I am sorry, of course the classes can also go into the gmmain.h. I figured out that it doesn't matter if they are placed in the gmcrate.h or the gmmain.h! Nevertheless, to get this SSGM source working as a compiled scripts.dll, here is the missing part= -And at the end of the gmcrate.cpp, you have to add the four Registrants- it should look like this= ScriptRegistrant<MDB_SSGM_Crate> MDB_SSGM_Crate_Registrant("MDB_SSGM_Crate",""); ScriptRegistrant<KAK_Prevent_Destruction_Until_Entered> KAK_Prevent_Destruction_Until_Entered_Registrant("KAK_Prevent_Destruction_Until_Entered",""); ScriptRegistrant<Power_Down> Power_Down_Registrant("Power_Down",""); ScriptRegistrant<EMP_Effect> EMP_Effect_Registrant("EMP_Effect",""); ScriptRegistrant<zbl_kamikaze_Suit_Crate> zbl_kamikaze_Suit_Crate_Registrant("zbl_kamikaze_Suit_Crate",""); ScriptRegistrant<reb_Electromagnetic_pulse> reb_Electromagnetic_pulse_Registrant("reb_Electromagnetic_pulse",""); BTW, I honestly didn't figure out what the PromotionCrate does. It gives me the ppage and nothing happens then. There's no custom event being activated etc. The EMPStorm seems to work -but on the GDI side only as far as I have seen. Anyway, it's nice to have 5 new crates. On some I've added decent ingame sounds. The BlownFuse for example does need a sound so players will notice that something is going on. What's more, the Set_Health and Set_Shield_strength commands aren't working. The Cook from the Kamikaze crate stays on his defaults, even though there is a Commands->Set_Health(sender,150); command included. I am planning to bypass this with a modified objects.gm because the Health+Shield commands aren't working on the GODcrate either. -------------------------------- Madrockz, I really enjoyed the !pct command! This is going into my SSGM r…
creator: EA-DamageEverything
date: 2008-04-11T20:59:43-00:00

Re: Code/Source Request Crates
type: item
description: I havn't looked, but you can't actually set the ehalth of a player to higher then what his max health is. If the God crate os trying to set the health to 1000 or something, but the presets current max health is 150 then it won't work. You can however set the max health, so you would have to set the max health to 1000 first then set health to 1000.
creator: reborn
date: 2008-04-12T09:06:14-00:00

Re: Code/Source Request Crates
type: item
description: reborn wrote on Sat, 12 April 2008 11:06 I havn't looked, but you can't actually set the ehalth of a player to higher then what his max health is. If the God crate os trying to set the health to 1000 or something, but the presets current max health is 150 then it won't work. You can however set the max health, so you would have to set the max health to 1000 first then set health to 1000. Exactly what I typed in my Source code about God Crate Then how is possible in SSAOW 1.3 it works? Was modified objects file?
creator: ExEric3
date: 2008-04-12T10:54:30-00:00

Re: Code/Source Request Crates
type: item
description: EA-DamageEverything wrote on Fri, 11 April 2008 16:59 I honestly didn't figure out what the PromotionCrate does. It gives me the ppage and nothing happens then Because it requires a veteran plugin to work, which is not public, wittebolx just copyed everything from my crates plugin that was posted a while ago
creator: Hex
date: 2008-04-12T12:24:37-00:00

Re: Code/Source Request Crates
type: item
description: Hex wrote on Sat, 12 April 2008 14:24 EA-DamageEverything wrote on Fri, 11 April 2008 16:59 I honestly didn't figure out what the PromotionCrate does. It gives me the ppage and nothing happens then Because it requires a veteran plugin to work, which is not public, wittebolx just copyed everything from my crates plugin that was posted a while ago indeed i copyed some of the crates and added some new ones. thats why you (hex) and reborn are on the credits list. soemone asked me to share the crates im currently using, so thats why i posted this. ps. the veteran system is open source (reborn's version)
creator: wittebolx
date: 2008-04-12T13:04:23-00:00

Re: Code/Source Request Crates
type: item
description: Hex's version is not
creator: jnz
date: 2008-04-12T13:43:05-00:00

Re: Code/Source Request Crates
type: item
description: there like 6 veteran systems out there 1 is public .....
creator: Gen_Blacky
date: 2008-04-12T18:32:55-00:00

Re: Code/Source Request Crates
type: item
description: Hex wrote on Sat, 12 April 2008 07:24 EA-DamageEverything wrote on Fri, 11 April 2008 16:59 I honestly didn't figure out what the PromotionCrate does. It gives me the ppage and nothing happens then Because it requires a veteran plugin to work, which is not public, wittebolx just copyed everything from my crates plugin that was posted a while ago Its a very good plugin, thank you about that! But i want to have a good working Veteran System. EDIT: I dont need the source of it. It would be good, if its working with the crate plugin, and i get support for it, if anything is wrong.
creator: MacKinsey
date: 2008-04-12T19:37:32-00:00

Re: Code/Source Request Crates
type: item
description: wittebolx wrote on Sat, 12 April 2008 09:04 ps. the veteran system is open source (reborn's version) Very true, but tha version does not have the Send_Custom_Event receiver that is required to use it
creator: Hex
date: 2008-04-12T20:42:58-00:00

Re: Code/Source Request Crates
type: item
description: Ok Hex you released a SSGM crates plugin with the promotion crate which only works with your vet system? If I find Reborns' vet code, how do I attach the Send_Custom_Event receiver? Will it work then like it should?
creator: EA-DamageEverything
date: 2008-04-13T17:36:00-00:00

Re: Code/Source Request Crates
type: item
description: If you're using a veteran system based on the code I posted a while ago, then it is pretty easy to make a crate function to make a player get "promoted", just do this in the crates function: VetUpdate(Get_Player_ID(sender), 40, Commands->Get_Points(sender)); That will add 40 veteran points to there current vet worth, promoting them immediately.
creator: reborn
date: 2008-04-13T18:51:47-00:00