Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Welcome, Guest!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign in to follow this  


Recommended Posts

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");

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.