nullsystems 0 Posted November 2, 2008 Hello, Im trying to get my head around a condition within UserActions. Heres an example: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class Man : Land { class UserActions { class Start { displayName = "Congrats!"; onlyForPlayer = "true"; position = this; radius = 0.5; condition = "alive player && !Done"; statement = "hint ""Done""; Done = TRUE"; }; class Start { displayName = "Bye!"; onlyForPlayer = "true"; position = this; radius = 0.5; condition = "alive player && Done"; statement = "hint ""Bye!""; Done = FALSE"; }; }; This does not work for me. All I want is the ability to have an action...then remove it once it has been activated...show another action...and remove that once it has been activated...and so on. But for some reason, it doesnt work! Nothing can be done from within the mission scripting, so I need a way of doing this as you see it. In other languages, if the variable 'Done' does not exist, it is FALSE. So why would it not work here? I just need a way of have a useraction show, then removed when a variable is set from within the addon. Any help would be great! Share this post Link to post Share on other sites
nullsystems 0 Posted November 2, 2008 I gave and used: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class RscDisplayEmpty; class RscDisplayMission : RscDisplayEmpty { onLoad="SET STUFF HERE"}; If anyone has a better idea let me know Share this post Link to post Share on other sites
[aps]gnat 28 Posted November 3, 2008 Couple of problems. - Both actions are called "Start". They should be different - Pretty sure you CANT use variables like "Done" inside Configs - Just incase "true" is not defined, you should use = 1; instead. - "this" is unlikely to work for position. It has to be a named point used inside the p3d model I'm guessing youre trying to overwrite all "Man" with this new Action. I'd suggest that the game engine probably won't allow it. Share this post Link to post Share on other sites