Modme Forums

Override laststand?

Game Modding | Call of Duty: Black Ops 3 | Scripting


Thread By: ihmiskeho
As the title suggests, how does one override the normal laststand function?

I've searched through some scripts and found that some scripts have something like:

level.X_last_stand_func = &function;
An example can be found in zm_powerup_weapon_minigun.gsc
level._zombie_minigun_powerup_last_stand_func = &minigun_powerup_last_stand;
So I tried something like this:
function init()
	//This is in the init function
	level.afterlife_laststand_func 	= &afterlife_laststand;

function afterlife_laststand()
	//For now it's just printing a text for testing purposes
	IPrintLnBold("Laststand override");

However, nothing prints in game. It's not calling the laststand function.
Is there something I'm missing here?


Reply By: mathfag



Reply By: ihmiskeho

zm.gsc level.playerlaststand_func

Tried this some time ago with no results. Turns out I had defined the custom laststand function BEFORE it gets defined in zm.gsc so the zm one was always overwriting the custom one
Got it working now. Thanks!