You need to attach the arguments to a script to the last argument of Attach_Script_Once() and related functions, if a script has more than one arguments you need to do something like:
Attach_Script_Once(obj, "script_name", "1024,derp,4.5");
where 1024 is an int, derp is a string and 4.5 is a float. In most cases you want to supply a "params" char buffer that contains the arguments formatted with a sprintf before hand, like so:
char params[256];
sprintf(params,"%d,%s,%s,%s,%s,%s",param,Get_Parameter("Underwater_Effect_Controller"),Get_Parameter("Surface_Water_Effect"),Get_Parameter("Underwater_Effect"),Get_Parameter("Surface_Swim_Sound"),Get_Parameter("Underwater_Swim_Sound"));
Attach_Script_Once(sender,"JMG_Swimming_Water_Effects_Script",params);
[Updated on: Sat, 26 May 2012 02:55]
Report message to a moderator