Jump to content
Sign in to follow this  
DankanX37

Problems making custom mine work with Zeus

Recommended Posts

Hello everyone, I'm making a mod that adds a special mine, soo far I've written both the script and added the mine in the cfgAmmo, vehicles, mag etc...

I'm now trying to make it work with Zeus interface, I've created the module and I'm able to spawn the mine, I wanted to hook my function using the "eventHandlers" class in the config.

class myMine: ModuleMine_F {
	//removed for brevity
        _ammo = "myAmmo";
	class EventHandlers {
		init = "systemChat 'init vehicle';";
	};
};

But this seems to bug the module and the mine doesn't spawn.

 

I tried to use the cfgAmmo EH:

class myAmmo: ATMine_Range_Ammo {
	//removed for brevity
        class EventHandlers {
		init = "systemChat 'init ammo';";
	};
};

 

But this one doesn't even fire when the mine is placed.

Both are registered and visible in the Config Viewer.

Is there a way to make a curator placed mine run a script on spawn?

Thanks.

Share this post


Link to post
Share on other sites

Apparently, I was overwriting the default EH for the module, I fixed this by doing:

class EventHandlers:EventHandlers {
  class myMod {
  	init = "systemChat 'init vehicle';";
  }
}

and

class ModuleMine_F: ModuleEmpty_F {
	class EventHandlers;
};

Tough the script still doesn't run on the created object but on the module.

Share this post


Link to post
Share on other sites

I solved this, I resorted to using the position of the module mixed with nearestObject in order to obtain the newly created mine and finish from there.

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×