PicVert 0 Posted April 11, 2003 I would make with my animation (Open door and Close door) an action that could enable and disable the get in back when the door is closed but not for the gunner or driver or commander just for cargo ! some one could help me here? that is what I do but it did'nt work just for cargo bay </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class UserActions { class Opensdoor { displayName="Open Door"; position="osa veze"; radius=6; condition="this animationPhase ""swidoor"" < 0.5 statement="this animate [""swidoor"", 1]; this cargo lock false"; }; class Closesdoor { displayName="Close Door"; position="osa veze"; radius=6; condition="this animationPhase ""swidoor"" >= 0.5"; statement="this animate [""swidoor"", 0]; this cargo lock true"; }; }; <span id='postcolor'> and how to make an eventhandler to lock it in init event how how how ?  Very helpful for ending an addon I have worked all night but did'nt find a solution   please help me  Share this post Link to post Share on other sites
Guest BratZ Posted April 11, 2003 Does the animation work too? Just curious if osa veze is taken and you missed a " on the first animation class.And the position I usually use the selection name(just that osa veze is surely in your memory lod?). The lock function doesnt work that way,it locks the whole vehicle,I will show you with the init line you want: };        class EventHandlers    {          init="this lock true";       }; }; It only locks the entire vehicle I havent actually thought of a decent way yet, I was going to do this sometime too Could use a script to unlock it for driver and gunner then lock it after, intercept the getin event...maybe do something there,few ways but we can come up with something,I havent used it yet is the problem But you also want to make sure you can open the door from the outside (you can that I see already see) But make it unlock then... class Opensdoor { displayName="Open Door"; position="swidoor"; radius=6; condition="this animationPhase ""swidoor"" < 0.5" statement="this animate [""swidoor"", 1]; this lock false"; }; Of course a single passenger would be easy to do and could be done this way,or just a vehicle with one door only (isnt yours?) Another reason I havent done this yet is I figured it may be hard for a mission maker to script in opening a door first to put soldiers in.They might get upset,lol Maybe that will help you think of a good way to do this? Share this post Link to post Share on other sites
PicVert 0 Posted April 11, 2003 LOL make me upset too. The best way I found is to put an eventhandler to open the door before the game start but when it's close no one can getin. Can I use the action Menu only for the commander or driver ? have you an I dea ? The posisition is right it will be osa veze ( I have a path lod ) and soldier can open the door from the top of vehicle or kill the driver or commander when  the turn out option is on by the top of vehicle or drop a grenade into the vehicle LOL I would implement an option in event... that check speed and close the door or open it when speed needed is tuch. some one could help me for that eventhandler WHY I M NOT CODER      I would close door when the speed is up 15Kmh like that but it did'nt work   </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class eventhandlers { init = "(_this select 0) Animate [""swidoor"", 1]; if (Speed (_this select 0) =>15) animate [""swidoor"", 0]"; }; <span id='postcolor'> Share this post Link to post Share on other sites
Guest BratZ Posted April 11, 2003 Sure you can amke the useractions for driver,gunner or cargo only ,but be carefull because it will only be available when they are inside the vehicle: //Fold and Unfold Wings from pilot's seats class FoldWingsU { displayName="UnFold Wings"; position="wingtipr"; radius=55 condition="this animationPhase ""foldwings"" >= 0.5 and driver this == player"; statement="[this, 1] exec ""\brt_sb2c\foldwings.sqs"""; }; class FoldWingsD { displayName="Fold Wings"; position="wingtipr"; radius=55 condition="this animationPhase ""foldwings"" < 0.5 and getpos this select 2 < 1 and driver this == player "; statement="[this, 0] exec ""\brt_sb2c\foldwings.sqs"""; }; Myself I would use the init to call a script that cycles and check your speed and do your stuff in there Share this post Link to post Share on other sites
PicVert 0 Posted April 11, 2003 THX but your scrit work in MP too ? for check speed ?? Share this post Link to post Share on other sites