grub 10 Posted February 2, 2011 (edited) Hey Guys, I'm making a mission at the moment that works flawlessly in SP. Me and a buddy tried it out last night in MP and the trigger didn't fire the same. Was wondering if I have to make a change for MP? So the premise is rescue the soldier and move to the "Safe Zone" marker where if the soldier is alive the mission is a success. If he dies, mission over. So, I'm using the current triggers. Trigger1condition: ( !(Captain in units player) && (Captain distance player < 3) ) On Act: Captain setCaptive False; Captain stop False; [Captain] join player; Task1 setTaskState "Succeeded"; player removeSimpleTask Task1; Trigger 2condition: ( (alive Captain && Captain distance getMarkerPos "SafeZone" < 100) || !(alive Captain) ) on act:if (alive Captain && Captain distance getMarkerPos "SafeZone" < 100) then {endMission "END1"} else {endMission "END2"}; So like I said, in SP it fires perfectly. soldier joins group and when he arrives at the safe zone mission ends all is well. In MP my mate went and grabbed him, he joined the group and I could order him about but he wouldn't move. I tested it again by myself on a server and the soldier joined again no sweat. Made him grab an AK and we were off, mission complete. So as I have limited knowledge i'm wondering how I can get him to be happy with any team member collecting him form his "cell". Any help would be much appreciated. Regards, (edit: Let me know even if it should work, or if I'm just going to have to make do with the "Team Leader" being responsible for collecting the prisoner) Grub Edited February 2, 2011 by Grub Share this post Link to post Share on other sites
daimyo21 2 Posted February 2, 2011 Hey Guys,I'm making a mission at the moment that works flawlessly in SP. Me and a buddy tried it out last night in MP and the trigger didn't fire the same. Was wondering if I have to make a change for MP? So the premise is rescue the soldier and move to the "Safe Zone" marker where if the soldier is alive the mission is a success. If he dies, mission over. So, I'm using the current triggers. So like I said, in SP it fires perfectly. soldier joins group and when he arrives at the safe zone mission ends all is well. In MP my mate went and grabbed him, he joined the group and I could order him about but he wouldn't move. I tested it again by myself on a server and the soldier joined again no sweat. Made him grab an AK and we were off, mission complete. So as I have limited knowledge i'm wondering how I can get him to be happy with any team member collecting him form his "cell". Any help would be much appreciated. Regards, (edit: Let me know even if it should work, or if I'm just going to have to make do with the "Team Leader" being responsible for collecting the prisoner) Grub I made a mission like this and the "VIP" was a civilian unit. It would almost bug everytime in MP that I was suuuper fed up with it. I eventually just used a Blufor (special unit) as the VIP (removeallweapons) and it never bugged out. Sometimes their reactions were delayed but eventually did what you said. I think it has sometihng to do with Civilian AI programming. If your using a BLUFOR already I dont know. Hope this helps! good luck! Share this post Link to post Share on other sites
bhaz 0 Posted February 2, 2011 If the wiki is accurate, I'm guessing it didn't work properly because the unit is local to the server. Meaning you would need to find a way to keep the detection and join group server-side. Though - this is a complete guess. Share this post Link to post Share on other sites
grub 10 Posted February 2, 2011 If your using a BLUFOR already I dont know. Yeh, he's a Marine. And a damn fine one lol. We don't crawl through the Lingor forests for any man... If the wiki is accurate, I'm guessing it didn't work properly because the unit is local to the server. Meaning you would need to find a way to keep the detection and join group server-side.Though - this is a complete guess. hmm, so I've been looking for anything similar to your suggestion, as that was also my guess. I can't seem to find anything that will state the change needed to make him join group server side. But I'm thinking that's the deal. Share this post Link to post Share on other sites
[frl]myke 14 Posted February 2, 2011 Try this: In the initline of one of the playable groupmembers (doesn't matter which, might be leader or not) write this: MyFancyGroupName = group this; And then in the trigger use this: [damnFineMarine] join MyFancyGroupName; Besides this, you should never ever use player command inside a trigger as it will easily break in MP environment. Use it only in scripts where you're 100% sure it will always run clientside. Share this post Link to post Share on other sites
grub 10 Posted February 2, 2011 (edited) Myke;1847453']Besides this' date=' you should never ever use player command inside a trigger as it will easily break in MP environment. Use it only in scripts where you're 100% sure it will always run clientside.[/quote']Right, so with the exception of the example you've given every player command should be scripted yeh? So do you mean the same command as the one in the trigger in a script? (Sorry first real attempt at MP mission) Or just use scripts in general? Thanks for the help Myke. Oh and I'll be at work for the next oh, 18hrs so I'll give it a bash when I get home tomorrow. Edited February 2, 2011 by Grub Share this post Link to post Share on other sites
shuko 59 Posted February 2, 2011 Triggers are local, each client machine checks the condition and fires the trigger independently. Thus, using "player" in the condition will cause it to fire only when that player is close enough. However, since dedicated server has no player, it will never, for example, be close enough of anything nor have a group etc. Meaning your trigger will never fire on dedi. The join command needs to be issued on the machine the unit is local to, in case of AI, it's the server. You can use player in trigger condition if you sync the firing to everyone. Example: Trigger 1: Cond: player in thislist OnAct: aPlayerAtTheArea = true; publicvariable "aPlayerAtTheArea"; Trigger: Cond: aPlayerAtTheArea OnAct: do whatever, this will be run on all machines and not just on the client that triggered the first trigger Anyway, to your problem. You can check if any player is close enough by doing this: Condition: {_x distance Captain < 3} count playableunits > 0 OnAct: [Captain] join group (thislist select 0) Share this post Link to post Share on other sites
grub 10 Posted February 2, 2011 Cheers shk. Good explanation. Clears up some MP stuff for me. I'll give it a go when I get home. Saying that I still may pester you yet :D Thanks all for your time. Grub Share this post Link to post Share on other sites
grub 10 Posted February 10, 2011 (edited) Hey guys, Have been caught up with RL and have just started to fool around with your info shk. n00b alert: So I think I've misunderstood your last post. I'm still unsure as to what code I need to be replacing here. I have tried a number of variations but I cant get the Captain to join in the same fashion as he does in the SP version. Am I still using my original triggers and adding a particular bit of code? [Captain] join group (thislist select 0) to replace [Captain] join player; ? Do I need your first example in a trigger as well? to initiate "thislist select 0" Sorry to bother you but I just can't get it to work. I really appreciate your help shk. Grub Edited February 11, 2011 by Grub Share this post Link to post Share on other sites
shuko 59 Posted February 11, 2011 Here is an example mission the way that I'd do it. Works on MP host and on dedicated. _grub_join.utes.rar Share this post Link to post Share on other sites
grub 10 Posted February 11, 2011 Oh wow man, thanks heaps for that. I'll credit you if I release it, as I plan to do so... Your da bomb Share this post Link to post Share on other sites