Forum Jump :

Author Message


Posts: 1589
Rank:


Level: Member

Country: pf
Location: Tahiti
Occupation: too many Arma
Age: 57
In-game name: Kobayashi Maru

 
#1 Posted at 2015-07-09 21:30        
     
Hi, MP skilled ArmaHolics!
I've read plenty of BIKI's and posts but I have a persistent doubt on what to do exactly with AI in editor.
So, i created a MP mission. I have two kinds of units (3 in fact): player (as required by editor or preview), playable units (in the same group than player), non-playable AIs for each sides.

Playable/player units have a custom equipment like: this addBackpack "B_Carryall_mcamo"; for "_i" from 0 to 1 do {this additem "FirstAidKit"}; this addPrimaryWeaponItem "optic_mrco"; this addMagazine "laserbatteries"; this addWeapon "laserDesignator"; this addHandgunItem "muzzle_snds_L"; and other equipments like this.
Nothing bad in SP or preview, and it works also if players are connected before launching the mission. It's the case when I play with friends. You guess it's hosted on my computer, not on a dedicated server.

But what if Join In Player???? (JIP) after mission start.

I read KK's blog: http://killzonekid.com/arma-scripting-tutorials-basic-multiplayer-coding-v2/ and I understand that a JIP entering the mission, owns a playable unit formerly owned by server, and triggers the init field of all the present units (via mission.sqm?).
Does That mean all global/global functions are reseted? for init field of my playable and/or not, AI units? And what for blank init field units?

Is JIP reseting all equipments of all units ? If not, which ones? Is it necessary to write: if (!isServer) exitWith {}; on each unit init field???
Too much reading, I'm lost with these MP topics. Thanks

This post was edited by Pierre MGI (2015-07-09 21:42, 836 days ago)

PLEASE CONTACT ME ON BI FORUMS FOR ANY SCRIPT / MOD QUESTION. TKS

Author Message


Posts: 1589
Rank:


Level: Member

Country: pf
Location: Tahiti
Occupation: too many Arma
Age: 57
In-game name: Kobayashi Maru

 
#2 Posted at 2015-07-11 10:16        
     
Noone, really?

This post was edited by Pierre MGI (2015-07-13 22:16, 832 days ago)

PLEASE CONTACT ME ON BI FORUMS FOR ANY SCRIPT / MOD QUESTION. TKS

Advertisement


Author Message


Posts: 27
Rank:


Level: Member

Country: za
Location: Cape Town
Occupation:
Age: 20
In-game name: Rabid Squirrel

 
#3 Posted at 2015-07-21 11:33        
     
Hey there,

It is likely that JIP completely skips the init. What you could try is adding it directly to the init of the unit rather than your init.sqf. Alternatively I find the best way to organise multiplayer kits is to create selectable loadouts in the Description.ext. Then regardless of JIP a person will have to select their loadout before they can spawn in.

Hope this Helps,
Squirrel.


Author Message


Posts: 1589
Rank:


Level: Member

Country: pf
Location: Tahiti
Occupation: too many Arma
Age: 57
In-game name: Kobayashi Maru

 
#4 Posted at 2015-07-22 16:12        
     
Yes, thank you Squirell.
Concerning your second point:
Are you creating classes in description.ext but in rscTitles in order to have a GUI menu called thru onplayerconnected sqf? I'm not sure description.ext can do the same things than config.cpp.

PLEASE CONTACT ME ON BI FORUMS FOR ANY SCRIPT / MOD QUESTION. TKS