bedlam 0 Posted July 26, 2004 class eventhandlers { Fired ="if  ((_this select 4)=={B_LAW}) then {(_this select 0) removeweapon {B_LAWLauncher}}"; }; // B_LAW= projectile // B_LAWLauncher=weapon its causing CTD Share this post Link to post Share on other sites
Footmunch 0 Posted July 26, 2004 class eventhandlers { Fired ="if  ((_this select 4)=={B_LAW})   then {(_this select 0) removeweapon {B_LAWLauncher}}"; }; //  B_LAW= projectile //  B_LAWLauncher=weapon its causing CTD Try: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Fired ="if  ((_this select 4) == ""B_LAW"")  then (_this select 0) removeweapon ""B_LAWLauncher""; "; instead. Share this post Link to post Share on other sites
bedlam 0 Posted July 26, 2004 Fired ="if ((_this select 4) == ""B_LAW"") then (_this select 0) removeweapon# error type object expected array.... it says Share this post Link to post Share on other sites
Footmunch 0 Posted July 26, 2004 Well, at least it's not CTD'ing  Not sure what the problem is. Try: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">fired =  "hint format[""%1, %2, %3, %4, %5"", _this select 0, _this select 1, _this select 2, _this select 3, _this select 4];" And make sure that (_this select 4) is what it's supposed to be. Share this post Link to post Share on other sites
bedlam 0 Posted July 26, 2004 WEST Alpha Black:1 (Bedlam), B_LAWLauncher, B_LAWLauncher, B_LAW, B_LAW Share this post Link to post Share on other sites
Footmunch 0 Posted July 26, 2004 Err, what about: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> Fired ="if  ((_this select 4) == ""B_LAW"")  then {(_this select 0) removeweapon ""B_LAWLauncher"" } "; We're getting closer, I think Share this post Link to post Share on other sites
bedlam 0 Posted July 26, 2004 no its another CTD. darnit Share this post Link to post Share on other sites
bedlam 0 Posted July 26, 2004 it works if i remove another weapon on this person. is it because the lawlauncher is active that causes ctd? Share this post Link to post Share on other sites
Footmunch 0 Posted July 26, 2004 Maybe. Could you remove the ammo instead? Or try selecting the 'other' weapon, then removing the LAW? You can get list of the weapons the soldier is carrying using the 'weapons' command. Share this post Link to post Share on other sites
bedlam 0 Posted July 26, 2004 hmm doesnt work with original lawlauncher either. must be a EH "fired" code fault or something. Share this post Link to post Share on other sites
bedlam 0 Posted July 27, 2004 looks like u cant delete a active weapon instantly as the EH will do.. some pause is needed.. fixed it with a script instead. Share this post Link to post Share on other sites