Jump to content

Sign in to follow this  
sickboy

ArmA (MP) Scripting

Recommended Posts

Quoting: "... there's no Briefing this time. init.sqf seems to run after the player gets control of his character".

During JIP init.sqf, you will found player not initialized. Have to waitUntil for a vaild player object.

Share this post


Link to post
Share on other sites

Hi guys, thank you very much for the information on the wiki,

I have a few noob questions regarding MP, I've made a fair few SP missions and am not unfamiliar with scripting, but I have never made an MP mission before.

Basically I want to do a coop mission but I am stuck at player spawn.

1) How do I get players allocated to an ingame soldier?

I would like to spawn a soldier and have a joining player take possesion of say a delta force operative. Do I create the vehicle and then <Missing knowledge of appropriate command> allocate the player to that vehicle by using the onplayerconnect command? If so what is the command to get the player to take possesion of said body or how do I go about that?

I am guessing onconnectplayer I createvehicle <unit>

then I use the setplayable vehicle command on said object. Is this correct? I am basing this on the following info:

  Quote
Also note that spawning doesn't create a body to use, but allows a player to choose an already existing one as defined either in the mission editor or in a script as 'player' or 'playable'.

If this is the case do I use the setinit command on the player to setrespawn times? (Have found the command for this)

I am aware of (!isserver) etc So I am aware that I have to ensure scripts for the player run specifically for the players machine.

2) Ho do I prevent players from joining side east for example?

Thats all for now. Thanks in advance for any assistance.

Share this post


Link to post
Share on other sites

Guys, i need some help. Last time i was trying to launch Warfare mission with ACE, i'd got the following errors on server RPT:

=====================================================================
== F:\Games\Bohemia Interactive\ArmA 2\arma2oaserver.exe
== "F:\Games\Bohemia Interactive\ArmA 2\arma2oaserver.exe" -config=server.cfg ;-netlog; -port=2302; -mod= @ace;@acex;@acex_sm;@acex_ru;@acex_usnavy;@cba
=====================================================================
Exe timestamp: 2011/05/28 03:43:20
Current time:  2011/06/13 18:24:54

Version 1.59.79384
Item str_disp_server_control listed twice
2011/06/13, 18:26:19 Unsupported language Russian in stringtable
[b]2011/06/13, 18:26:19 Missing addons detected:
2011/06/13, 18:26:19   ace_main
2011/06/13, 18:26:19   ace_sys_playerhud
2011/06/13, 18:26:19   ace_sys_crewserved
2011/06/13, 18:26:19   ace_sys_wounds
2011/06/13, 18:26:19   ace_sys_tracking[/b]
2011/06/13, 18:26:19 Warning Message: Ð’Ñ‹ не можете играть/редактировать Ñто задание, так как оно завиÑит от Ñкачиваемого контента, который был удален.ace_main, ace_sys_playerhud, ace_sys_crewserved, ace_sys_wounds, ace_sys_tracking

Of course, mission didn't start. But all these addons are present, and the same situation i had with this mission on WASP ACE server. In cause of LAN, no one error, no problems, but have one interesting thing:

Addon acex_ru_veh_naval ([b]entry ACE_Ural_RU_D[/b]) not found in the list of active addons.
Warning Message: Ð’Ñ‹ не можете играть/редактировать Ñто задание, так как оно завиÑит от Ñкачиваемого контента, который был удален.
acex_ru_veh_naval
"[WFBE (INFORMATION)][frameno:14562 | ticktime:293.667] Common_CreateVehicle: A EAST '[b]ACE_Ural_RU_D[/b]' vehicle has been created (position: [2727.14,7928.94,0.0849457])"

Please, any suggestions. Thanks

Edited by woore

Share this post


Link to post
Share on other sites

Hey, just discovered TeamSwitch, been having a play and realised that teamswitch goes between ANY playable character... is it possible to lock this down via script so that TeamSwitch only offers switches between current faction?

Thanks in advance

Share this post


Link to post
Share on other sites

Am I doing this right as far as MP scripting is concerned:

1. I called a script from the init.sqf of the mission that attaches an addaction to every building on a specific type on the map. I did this all without any specific isServer checks. How does this play out on a dedicated server? Will it repeat itself for every client joining?

2. If I wanted something to only execute on the server, like the example above, does that still mean a client can use that addaction?

3. I have seen some missions use "server" subfolders with their separate "init.sqf" in it. Can someone clear up how is supposed to work? Does the game automatically detect things to be server side only by the folder name?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×