Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Server side mods (I have some questions)
Re: Server side mods [message #381346 is a reply to message #380952] Sun, 19 April 2009 13:19 Go to previous message
Genesis2001
Messages: 1397
Registered: August 2006
Karma:
General (1 Star)
Start by making your own scripts.

Base Script:

class zbl_Example_Script : public ScriptImpClass
{
public:
   void Created(GameObject *o);
   void Timer_Expired(GameObject *o, int num);
   void Killed(GameObject *o, GameObject *s);
};



void zbl_Example_Script::Created(GameObject *o)
{
   Commands->Start_Timer(o, this, 300.0f, 123);
}
void zbl_Example_Script::Timer_Expired(GameObject *o, int num)
{
   if ( num == 123 )
   {
      Console_Input("msg zbl_Example_Script::Timer_Expired has expired...continuing!");
      Commands->Start_Timer(o, this, 300.0f, 123);
   }
}
void zbl_Example_Script::Killed(GameObject *o, GameObject *s)
{
   Console_Input("msg zbl_Example_Script::Killed called.");
}
ScriptRegistrant<zbl_Example_Script> zbl_Example_Script_Registrant("zbl_Example_Script", "");



Keep in mind, that when writing scripts, if you expect to release them, pick a prefix for your scripts. Mine is "zbl_" as those are my initials. jonwil's prefix is "JFW_" cos those are his initials. APB uses "RA_" and SCUD Storm uses "SCUD_" generally.

etc etc.

Just start by playing with the Scripts API and you'll learn more and more.

Some of the key stuff is in scripts.h and engine_*.h

Just explore the ScriptCommands struct ("Commands" variable; "Commands->_____")
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Suggest Vehicles
Next Topic: Comment on mod pics
Goto Forum:
  


Current Time: Mon Dec 23 22:07:33 MST 2024

Total time taken to generate the page: 0.00957 seconds