Tartari Posted May 21, 2007 Share Posted May 21, 2007 hello! Thank you BFC and 1C for the game! just wanted to know if there is other multiplayer's goal than destoying all the ennemies, is it possible to change the trigger's fail/win conditions? Link to comment Share on other sites More sharing options...
dmg Posted May 21, 2007 Share Posted May 21, 2007 Currently all the network missions are quite simple. The only goal is to destroy all the soldiers of the opponent. But you may create your own network missions using the MissionEditor tool. Link to comment Share on other sites More sharing options...
Tartari Posted May 21, 2007 Author Share Posted May 21, 2007 thank you dmg for your quick reply! I have already done new MP missions,very happy to can do that, but looking at the triggers I'd like to know if i can change them...for example, not killing all the ennemies, putting a time trigger...(sorry for my english) and BTW, it would be nice to add victory flag. Link to comment Share on other sites More sharing options...
nonickch Posted May 21, 2007 Share Posted May 21, 2007 Not killing all the enemies should be pretty easy. I just took a quick look of the first MP mission in the retail version. You can see numerous GetNUnits in it's triggers. From what I remember all of em are compared to 0 in subsequent lines. Uniformingly changing that 0 value to something to your liking should do the trick (I have no way on testing MP missions so I can't make sure). Say... something like 10-20? For more complex cases, you will have get into scripting more. It's not that tough if you have some minor coding history. For example, capture the hill for 30 mins should be something like this (in the same 1st MP mission): * Apparently each client checks for everbody's win/loose conditions independently, so you have to do that in each client, hence: * Define a rectangle area on the mission with the name "Rect_Win" * Create a trigger named like "IsHillHolder(@win_rect) which does the following (out of the top of my head, logical and syntax errors are more than likely to be in here) ----- //Returns the current holder of the hill PARAM IN @win_rect PARAM IN @army PARAM IN @client_ID PARAM OUT @holder SET @holder = 0 SET @client_num = MP_GetClientNum ( ) SET @i = 0 SET @units=0 SET @alliance_num = MP_GetClientAlliance ( @client_ID ) //Check to see if the army has any units on the hill //If not, return false (0) SetWorkArmy ( ARMY , @army ) SET @units = GetNUnitsInArea( ARMY , @army , "HUMAN" , @win_rect , "CREW" ) IF ( @units = 0 ) THEN SET @holder = 0 RETURNPARAMS HALT ENDIF //Since the army has units on the hill, check if //any other hostile armies have units on the hill. //If not, then it's a win scenario (1). Otherwise //return fail (0) SET @holder = 1 LABEL FOR IF ( @i lessthan @num ) THEN SET @valid = MP_IsClientValid ( @i ) SET @testing_alliance = MP_GetClientAlliance ( @i ) IF ( @valid = "TRUE" && @ @alliance_num != @testing_alliance) THEN SET @hostile_army = MP_GetClientArmy ( @i ) SetWorkArmy ( @hostile_army ) SET @hostile_units = GetNUnitsInArea( ARMY , @hostile_army , "HUMAN" , @win_rect , "CREW" ) IF ( @hostile_units morethan 0 ) THEN SET @hodler=0 RETURNPARAMS HALT ENDIF ENDIF ADD ( @i , 1 ) GOTO FOR ENDIF RETURNPARAMS HALT ----- So this last bit of code is written so you don't have to change much of the default coding of the win default mission win/lose conditions. Repacing calls to GetNUnits with IsHillHolder should suffice (they're default checking to =0 for loose condition). * You STILL need to change the victory condition with something like the following snippet (pseudocode cause I'm in a hurry) --------- SET @winner = -1 WHILE (@winner = -1) (use the for looping like snippet) FOR.... <insert the same as snippet for looping all clients> IF (isHolder(@curent_client)) THEN FOR (i=0, i lessthan 10, i++) //10 is the num_mins to hold hill to win SET still_holder = isHolder(current_client) IF (still_holder=0) THEN BREAK (exit the timecounting loop, client lost hill) ENDFOR IF (still_holder = 1) THEN SET @winner=@current_client (timer expired and current checked client still has the hill. He pwns) ENDIF Delay(60000) (wait a min before checking hill holder again) ENDFOR ENDWHILE //following lines prolly dead wrong, but you get the point. MP_Client_win(@winner) Set @win_alliance = MP_GetClientAlliance(@winner) MP_AllianceWin(@win_alliance) --------- So what the previous psudocode does is to keep looping untill there is a winner (1st WHILE). The while loop continually goes through all the clients in the game and checks one after the other to see if he holds the hill (1st FOR). When a holder is found, it starts countdown by checking to see if the same client is still the holder after one minute, and will do so untill the 10 mins expire. If timer expires then we got a winner, otherwise go back to the looping to see who holds the hill now. Right, this was supposed to take 5 mins and took me well over30 mins. Dammit. [rant] OH SWEET JESUS MY EYES, WHO CODED THAT MISSION? Like seriously, lay off the goto's. using them to emulate for's is "so-so" at the current state of the language, but using em to jump in and out of your emulated "for" loops is logical suicide. I so wanna shoot me for copying those bits off the default mission btw, are those MP comments written in russian? [/rant] EDIT: oh, sorry, forum software ate the indentation. Good luck following those if's/while's [ May 21, 2007, 10:57 AM: Message edited by: nonickch ] Link to comment Share on other sites More sharing options...
Tartari Posted May 21, 2007 Author Share Posted May 21, 2007 Thank you Nonickch Link to comment Share on other sites More sharing options...
Ankh Morpork Posted June 10, 2007 Share Posted June 10, 2007 I'd really like to see more multiplayer missions. I finally bought this game today and I have to say that I was VERY disapointed in the multiplayer. I'd like to buy my units, recieve reinforcements, use planes/artillery and most of all - have a goal apart from destroying the enemy. Best of all would be if they made a random generator option just like we've got in Combat Mission. Atm this game feels abit waste of money for me (as I only wanna play multiplayer. I've been playing the CM games frequently with my brother since the first one was released). Would atleast wanna be able to play through the missions in multiplayer. Big thumbs down so far really! Link to comment Share on other sites More sharing options...
Tartari Posted June 10, 2007 Author Share Posted June 10, 2007 hello! We had an answer by BF here Link to comment Share on other sites More sharing options...
Ankh Morpork Posted June 10, 2007 Share Posted June 10, 2007 Ta, didnt see that one. Link to comment Share on other sites More sharing options...
Recommended Posts