Aller au contenu

Photo

Two pc factions enemy


  • Veuillez vous connecter pour répondre
3 réponses à ce sujet

#1
Nebril2

Nebril2
  • Members
  • 59 messages
Hi all

I'm trying to create a pvp multi-player mod, where each pc has his followers who are enemies with the rest of the pc players....
But suddenly I realized "hey nebril there's only one pc faction" so.... That is a problem to me... I think with reputation adjustments it might be done but it's odd... It's another way?

Thanks

#2
henesua

henesua
  • Members
  • 3 878 messages

i think you can do this with scripting. you could make different factions.

Lets say you have factions A, B, C.
and players 1, 2 ,3

at start each of A B and C are neutral to the player faction. but during runtime you could assign all members of a particular faction to be hostile to a specific player.

So Player 1 logs in talks to a representative of Faction A, and that faction now becomes a friend to Player 1 but an enemy to players 2 and 3.

The function that does this is AdjustReputation

you'd do this to make it happen:

AdjustReputation(Player1, FactionA_member, 100);
AdjustReputation(Player2, FactionA_member, -100);
AdjustReputation(Player3, FactionA_member, -100);

 



#3
Nebril2

Nebril2
  • Members
  • 59 messages

Yes that could do it. Will try it tomorrow. 

 

And one more very noob question as im new in the "multiplayer" scripting.

 

when you say 

 

 

AdjustReputation(Player1, FactionA_member, 100);
AdjustReputation(Player2, FactionA_member, -100);
AdjustReputation(Player3, FactionA_member, -100);

you are using player1,2 and 3 as a variable name representing the pc player objects, but how you call determinated player to a script if the player is not in the area? I mean a way to call easily player 1 or 2 or 3 in any script. 

 

And thanks again henesua! :) you are being very helpfull,



#4
henesua

henesua
  • Members
  • 3 878 messages

how you get the player object depends on what you are doing.

But it is possible to loop through all the player objects in a module with the following pair of functions

 

GetFirstPC();

GetNextPC();