Home   Help Search Login Register  

Author Topic: Detecting other players?  (Read 1232 times)

0 Members and 1 Guest are viewing this topic.

Unnamed

  • Guest
Detecting other players?
« on: 19 Feb 2004, 11:25:54 »
Hi,

I'm working on an addon that uses the Fire command to fire off a round, however I only want to do this when its an AI gunner.

I can use the Player command to see if I'm in the gunners position, but in Multiplayer how could I detect if another player gets in as the gunner?

Because its an addon I cant use the Skill level trick as thats up to the mission designer, and I would prefer not to make the mission designer compile a list of players himself.

Any ideas?

Cheers

gundernak

  • Guest
Re:Detecting other players?
« Reply #1 on: 19 Feb 2004, 13:20:29 »
I have built a script in a different situation, but I had to use 'player' to refer the actual gunner of 3 boats when me and 2 buddies of mine were the gunners.
This script worked with every machines in MP, with the playable rolls as well.

So I guess when a script runs in every local machine and you use 'player' to refer the dude who is behind the keyboard, it will work.

So in my opinion you can use: '? player == gunner vehiclename'

If anyone disagree, plz correct me...

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:Detecting other players?
« Reply #2 on: 19 Feb 2004, 17:10:44 »
use a gamelogic called server

and use the line

?!(local server): exit

at the start of the script that you want to run these AI

AI are controlled solely by the server and using the line above and a gamelogic correctly named will ensure this happens
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

Unnamed

  • Guest
Re:Detecting other players?
« Reply #3 on: 19 Feb 2004, 19:56:23 »
I'm a bit slow when it comes to the MP side so bear with me, I'm still trying to understand the principles. So If I sound Dogmatic, thats not my intention.

@Gundernak

The script is designed for AI group members only, it sits there looping though each AI member of a particular players group. Another player could get in as gunner if the AI dies while its still looping, would this still apply?

@Terox

I know adding a GameLogic called server is the adopted method for most MP games. But rather than having to explain this in the Addons documentation, is it possible to automaticaly create my own Server GameLogic from within the Init event of the addon?

To be honest this makes me think how hard it is to learn the MP without a server to experiment on. If I was to create a little network, whats the bear minimum spec required for OFP's standalone server, just to run a few basic tests and nothing more?

Edit:

Can you run the standalone server on the same machine thats also acting as a client, would that still work the same?


Cheers guys


« Last Edit: 19 Feb 2004, 23:34:35 by Unnamed »

gundernak

  • Guest
Re:Detecting other players?
« Reply #4 on: 20 Feb 2004, 10:24:30 »
I think what I wrote could work...Altought you should try

As I told you I used this for making the possibility for a player to move into the driver or the gunner seat of a boat, or send a group member from the cargo to these seats.
You know when a gunner or driver is killed in a boat, without this you can not fire or you will stay on the sea and can do nothing...In this situation it worked, but I tell you I had not been testing it enough to claim it for sure.

As I see you need a condition or check somewhere...what will tell you is there any player in the gunner position...I would try this, altought I am not sure it is working for you...

Unnamed

  • Guest
Re:Detecting other players?
« Reply #5 on: 21 Feb 2004, 04:27:10 »
Quote
I think what I wrote could work...Altought you should try

Thanks and I will, there is so much I need to learn about MP, I doubt I even know what the question is right now.

I have an old PC I'm going to try to rigg it up as a server and experiment.

Thanks again.