Andmann Posted July 29, 2016 Share Posted July 29, 2016 (edited) I would like to know whether there is a pvp flag that determines if a player is hostile or not. If so is it changeable? or does the server handle the ability to pvp via a global that is simply turned on or off without any player flags? ( all or nothing principle) I'm experimenting with the idea of creating factions tho before I start I'd like to know if theres even a point in trying. Edited July 29, 2016 by Andmann Link to comment Share on other sites More sharing options...
Andmann Posted July 29, 2016 Author Share Posted July 29, 2016 I believe I foudn what I was looking for ^___^ function Combat:CanBeAttacked(attacker) if self.inst:HasTag("playerghost") or self.inst:HasTag("noattack") or self.inst:HasTag("flight") or self.inst:HasTag("invisible") then --Can't be attacked by anyone return false elseif attacker ~= nil then --Attacker checks if self.inst:HasTag("birchnutdrake") and (attacker:HasTag("birchnutdrake") or attacker:HasTag("birchnutroot") or attacker:HasTag("birchnut")) then --Birchnut check return false elseif attacker ~= self.inst and self.inst:HasTag("player") then --Player target check if not TheNet:GetPVPEnabled() and attacker:HasTag("player") then --PVP check return false I believe adding another flag to players like "faction_1", "faction_2" and then checking for it at this positin would do the trick I guess this won't deal with friendly fire from AOE. Can anyone clarify? ^___^ My current plan is to create a Server with a lobby and 2 ~ 3 shards. lobby ->shard_1 <-> shard_2 <->shard3<- lobby upon entering the players will start in a lobby kind of like a save-house where enough food spawns etc for people to survive indefinitely. a script will frequently count the number of players in the lobby, their team flag and current player count. if it is even the players will be split into two factions and then teleported to their respective shards - in this example either shard_1 or shard_3. Already assigned players will of cours ebe assigned their previous faction and are counted to the even or odds equation. Thus a player who already spwaned once will always be able to rejoin on each reinforcement wave. an announcement might appear beforehand stating "reinforcements will arrive soon" and "reinforcements have arrived". each shard will have an objective that needs to be destroyed - possibly something like the Deer =D. upon destruction the server will reset and a winner is announced. a player that died will respawn naked in the lobby and will have to wait for the reinforcement phase. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now