ayser 1 Posted January 16, 2012 I know this is possible, but I have no clue how they work, do they make a bunch of triggers around an area of operation and put in to repeat? Can someone guide me through this? Bare with me i'm still pretty new to Arma 2 scripting, thanks! Share this post Link to post Share on other sites
BigMorgan 11 Posted January 16, 2012 You want to kill any players that move outside a defined area? Create a trigger, anyone present, repeat, countdown for 5-10 seconds (or however long you wish) in each field, with this in the on act: { _x setDamage 1 } forEach list this Just make 3 more copies of that trigger to make a box around the area. Ideally, you should make some warning markers so people know where they shouldn't go. Share this post Link to post Share on other sites
ayser 1 Posted January 16, 2012 (edited) I'm going to use that, but I want to say "Move back in the area of operation" first, then if they go further i'll m ake another trigger with your script. I'm trying to make it say the players name, this is what I have, but it doesn't work. Any help? {hint format["Move back in the area of operation %1 !", name _x]} forEach list this Edited January 16, 2012 by ayser Share this post Link to post Share on other sites
twirly 11 Posted January 16, 2012 Use thislist instead of list this. Share this post Link to post Share on other sites
ayser 1 Posted January 16, 2012 Tried it, it doesnt do anything, I get no scripting errors, but it just wont show the hint. Do I make a script and put that code in it, or just put it in a trigger? Share this post Link to post Share on other sites
cuel 25 Posted January 16, 2012 thisList refers to the list of the trigger, so you'd have to use it on the trigger Share this post Link to post Share on other sites
ayser 1 Posted January 16, 2012 Alright, on the kill trigger I changed list this to thisList, and it works now, but the hint still doesn't work, is there something wrong with the code? Share this post Link to post Share on other sites
twirly 11 Posted January 16, 2012 Something that needs to be pointed out is that scripting for a Multiplayer game is very different to scripting for a Single Player game. Trying to create a Multiplayer game without loads of scripting knowledge is going to be an almost impossible task. That would be jumping in on the deep end...and will only lead to frustration. With the trigger... it is more than likely that only one person will set it off but the whole group needs to get the message. Correct? Share this post Link to post Share on other sites
ayser 1 Posted January 16, 2012 Something that needs to be pointed out is that scripting for a Multiplayer game is very different to scripting for a Single Player game. Trying to create a Multiplayer game without loads of scripting knowledge is going to be an almost impossible task. That would be jumping in on the deep end...and will only lead to frustration.With the trigger... it is more than likely that only one person will set it off but the whole group needs to get the message. Correct? Someone walks into the area, and it says a hint to everyone saying "Please move back into the area of operation PLAYER". So not a group, but the whole team (Or server, whichever is easier) Share this post Link to post Share on other sites
twirly 11 Posted January 16, 2012 The thing is.... how to determine who is "everyone". In a MP game you would use.... playableunits In a SP game you would use.... switchableunits Both playable units and switchableunits may return more units than players....so you still need to determine who the human players are in those lists. You see it gets messy quickly. You need to read about and understand "locality"..... here are two quick links. http://community.bistudio.com/wiki/Locality_in_Multiplayer EDIT: The second link won't let me paste it properly...so you only really get one link! Google it. Share this post Link to post Share on other sites
shuko 59 Posted January 16, 2012 Well, if you only want to show a hint saying the player should get back to the defined area, then you don't need any MP scripting since hint is local, triggers are local and player variable is local. Share this post Link to post Share on other sites
twirly 11 Posted January 16, 2012 (edited) He wants all players to get the hint....and the hint must have their name. Edited January 16, 2012 by twirly Added stuff Share this post Link to post Share on other sites
shuko 59 Posted January 16, 2012 So, if Im not completely misunderstood, wouldnt this suffice: activation: player side or anybody present repeatedly condition: !(player in thislist) on act: hint format ["get back %1", name player] on deact: hint "thank you" ---------- Post added at 11:07 PM ---------- Previous post was at 11:06 PM ---------- All players as in everyone who crosses the line or as everyone getting a hint that player X crossed it? Share this post Link to post Share on other sites
twirly 11 Posted January 16, 2012 (edited) I'm no MP guru.... but would any of the other players get that hint? I think he wants all players to get the hint.... something like... On Shuko's machine..... "Please move back into the area of operation Shuko" On Twirly's machine..... "Please move back into the area of operation Twirly" Edited January 16, 2012 by twirly Clarity Share this post Link to post Share on other sites
shuko 59 Posted January 16, 2012 If he wants everyone to see a hint about someone else, then I would do it with a simple loop instead of trying to make a trigger to do the hint, because with a repeatedly trigger it would not fire for second time after one guy is outside, until he gets back etc. Share this post Link to post Share on other sites
twirly 11 Posted January 16, 2012 It would be very easy without the "name" part! Share this post Link to post Share on other sites