soul_assassin 1750 Posted December 31, 2008 hello, I was wondering if anyone knows how to properly condition the useraction class in the cfgvehicles. For example: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class CXVCV Â Â Â Â Â Â Â Â Â { Â Â Â Â Â Â Â Â Â Â displayName = "XCXX"; Â Â Â Â Â Â Â Â Â Â position = ""; Â Â Â Â Â Â Â Â Â Â radius = 0.1; Â Â Â Â Â Â Â Â Â Â condition="this animationPhase ""VCHD"" < 0.5"; Â Â Â Â Â Â Â Â Â Â statement="this animate[""HSBD"",1]"; Â Â Â Â Â Â Â Â Â Â onlyForPlayer = true; Â Â Â Â Â Â Â Â Â }; works fine and everything is jolly. But if I want multiple conditions line animPhase and speed to be a certain value such as: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class CXVCV Â Â Â Â Â Â Â Â Â { Â Â Â Â Â Â Â Â Â Â displayName = "XCXX"; Â Â Â Â Â Â Â Â Â Â position = ""; Â Â Â Â Â Â Â Â Â Â radius = 0.1; Â Â Â Â Â Â Â Â Â Â condition="(this animationPhase ""VCHD"" < 0.5) and (this speed < 1)"; Â Â Â Â Â Â Â Â Â Â statement="this animate[""JHDK"",1]"; Â Â Â Â Â Â Â Â Â Â onlyForPlayer = true; Â Â Â Â Â Â Â Â Â }; For this example ive tried: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">condition="(this animationPhase ""VCHD"" < 0.5) and (this speed < 1)"; <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">condition="(this animationPhase ""VCHD"" < 0.5) && (this speed < 1)"; <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">condition="this animationPhase ""VCHD"" < 0.5; this speed < 1;"; all of which spit out an error either "missing "("" or "missing ";"". So how should it be done? Share this post Link to post Share on other sites
Messiah 2 Posted December 31, 2008 directly from a working addon of mine: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class range_menu  {   displayName="Select Range";   position="range_menu_pos";   radius=5;   condition="(player == gunner this) && (this animationPhase ""range_menu_anim"" < 0.5)";   statement="this animate[""range_menu_anim"",1]";   onlyforplayer = true;  }; I can't see what you're doing 'wrong', but I know the code I posted works, so you should be able to copy paste and alter to your specific needs. Share this post Link to post Share on other sites
soul_assassin 1750 Posted December 31, 2008 just realised that stupid me had wrong syntax :P should have been 1 > speed this rather then this speed < 1 Share this post Link to post Share on other sites
Messiah 2 Posted December 31, 2008 always the way - good that its fixed either way Share this post Link to post Share on other sites