Sarge 1 Posted March 28, 2013 Greetings all, Anyone has an alternative for handling the issue that enemy factions cant travel in the same car ? Given that enemy factions cant travel in the same vehicle, i tried to find a solution to this. My requirements 7 setup: - There is one faction side that players can be on (west) - but within that faction, players are distinguished (indians, cowboys and bandits, distinguished by an object variable, very similar to Dayz). - AI is on 2 sides - the same as the players (=west = rangers, marshals), and east = bandits. - To have the west AI shoot player bandits, i use addrating from a trace function on the AI that checks the object value of the player and uses addrating -x on these to identify bandits. - east AI is unfriendly to everyone, so they shoot on sight This all works like a charm, the issue comes when my players try to board a coach. A group of bandits where the players were traced (and addrated = moved to side = enemy) are not able to travel together. A cowboy and a bandit are not able to travel together Things i tried: a) setcaptive - doesnt work, i want AI rangers to shoot at coaches when a player bandit is in there, as well as AI bandits shoot at a coach regardless of what type of player is in there. b) attach a trigger to the coach, which does the following: b1) identify any unit approaching or leaving an area around the vehicle b1a) maintain a list of all players that are IN the trigger area b2) check the rating for this player, store it in a player variable, and set it to 0 (= switch back the player from side enemy to his initial side) b3) if a bandit joins the vehicle area as first to approach, generate a group resistance (enemy to west and east), and add the bandit to that group b3a) any further player that joins the area will be moved in that group, so in essence a cowboy travelling with a bandit will be in a resistance group. -> by this, groups that have at least one player bandit will be engaged by west and east AI when travelling in the vehicle b4) if only cowboys join the vehicle area, do nothing, they can travel together and get attacked by bandit AI (east) c) if a player leaves the area trigger, restore his rating and check if conditions for the vehicle group still apply to make it a resistance group, if not, switch the players to a west group. In theory this sounds like the perfect solution to overcome the travelling in a vehicle problem. In reality, the group switch doesnt work. even if i greate a nulgroup first and join the player, then let the player join the resistance group, the behaviour of the ARMA engine is somehow unpredictable. If i query the side of the player after the resistance group join, sometimes the side is west, sometimes it is resistance ... Is there ANY other way to achieve what i described above? Adding an action to the coach "get in" and moveToCargo is a potential solution, not sure about this though. Anybody found an elegant way around this ? How about the developers of the citylife RPGs ? Domination? Thx & cheers Sarge Share this post Link to post Share on other sites
Sarge 1 Posted March 30, 2013 solved. Trigger per car, 2 constant groups with a dummy unit in there for each side, switching players in and out of those constant groups. Share this post Link to post Share on other sites