bakubaku 0 Posted January 18, 2004 Hi, I am new to OFP mission editing stuff so please bear with me. I want to convert MP CTF mission(2-8_T_CAPTURETHEFLAG1.EDEN)so player can switch to any member's view on his/her side. The reason behind this is that I only play this mission with my bro online 1on1 and want to have all AI's view to help situational awareness. I add the following code on all the AI's initialization field. this addaction ["us/ru switch to player","switch_to_player.sqs"]; and add the following to player's initialization this addaction ["us/ru switch2","switch2.sqs"]; this addaction ["us/ru switch3","switch3.sqs"]; this addaction ["us/ru switch4","switch4.sqs"]; and each of the switch.sqs only have two lines of code: [us/ru]_soldier[2/3/4] switchcamera "external" exit I think it is really reduntant. Is there any way to make it cleaner? After the AI soldier die, I can no longer access the action menu hence can't switch back to others view. How do I get round this problem? Do I need to have a trigger to each soldier to check if_not_alive switchback to player? Also, if the player gets kill and respawn, all the action added is gone hence can't switch to others view. Any workaround? Also I have the following questions: 1. What does game logic object mean? since I saw this object in a few tutorial mission. 2. What does "respawn" in description.ext of MP mission mean? 3. How do I add something to command menu because I saw a "custom" command there. I am sorry I didn't look through all the tutorial but I did scan through a few. A link to a particular tutorial that answer my question would be appreciated. Thank you very much. Share this post Link to post Share on other sites
Taurus 20 Posted January 19, 2004 1: ;;Unit with action, can be player or other objects, as if you add an "addaction" to an flagpost, the flagpost will be returned here _unitwithaction = _this select 0 ;;unit that activated the action, mostly players, you can order your teammebers to use this action as well. dunno if AI units(not in a player group) can be scripted to use actions _activatingunit = _this select 1 ;;action index, the current index, usefull if you want to remove the action from the unit/object that currently has it. _actionidex = _this select 2 e.g. table1 addAction["MAP","MAPVIEW.sqs"] table1 addAction["other","otheraction.sqs"] "map" will have index 0 and "other" will have index 1 and so on to remove the action using the index you write table removeAction _actionindex So you should only need one script with these three lines in it <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_activatingunit = _this select 1 ?!(local activatingunit): exit _activatingunit switchCamera "external" to prevent beeing "stuck" in an dead body simply add @!(alive activatingunit) player switchCamera "INTERNAL" exit to the AI script. Gamelogics are object that can be used in an very advance way, mostly they are used as checking ?!(local Server): exit to prevent scripts to be run on the clients. the gameLogic here is named "Server" can be anything. Respawn in description.ext mean: Quote[/b] ];==Modes ;NONE - no respawn ;BIRD - as seagull (default) ;INSTANT - at place you last died ;BASE - at your base ( set with markers "Respawn_West", "Respawn_East" ;GROUP - into a remaining soldier of your group (assigned group/platoon) WORKS ONLY FOR GROUP LEADER WILL GET FIXED IN PATCH ;SIDE - into a remaining soldier of your side (east, west) NOT WORKING 0 = no respawn 1 = seagull (the default) 2 = instant 3 = at the base 4 = group 5 = side e.g.(note: ";") respawn="base"; respawndelay=10; 3: I have no idea. I'm not sure what you mean I can add. Share this post Link to post Share on other sites