[-HOH-]szymek777 Posted July 25, 2014 Share Posted July 25, 2014 I need script which i can put in zone and have included time to send custom to ID Link to comment Share on other sites More sharing options...
&Genesis2001 Posted September 27, 2014 Share Posted September 27, 2014 Source file: (be sure to include engine.h and scripts.h)void zbl_Zone_Enter_Send_Custom_Object::Entered(GameObject *o, GameObject *enterer){ if (Get_Player_Type(enterer) == Get_Int_Parameter("Player_Type")) { int ID = Get_Int_Parameter("ID"); int message = Get_Int_Parameter("Message"); int param = Get_Int_Parameter("Param"); Send_Custom(ID, message, param, enterer); }}Header file:class zbl_Send_Custom_Base abstract{protected: void Send_Custom(int ID, int message, int param, GameObject *sender, float delay = 0.0f) { GameObject *o = Commands->Find_Object(ID); if (o) { Commands->Send_Custom_Event(sender, o, message, param, delay); } }};class zbl_Zone_Enter_Send_Custom_Object : public ScriptImpClass, zbl_Send_Custom_Base{public: void Entered(GameObject *o, GameObject *enterer);};Registrant: (including my macro)#define Register_Script(ClassName,Params) ScriptRegistrant<ClassName> ClassName##_Registrant(#ClassName,Params)Register_Script(zbl_Zone_Enter_Send_Custom_Object, "Player_Type:int,ID:int,Message:int,Param:int"); [-HOH-]szymek777 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now