Home   Help Search Login Register  

Author Topic: 1stAid sync to created unit?  (Read 3060 times)

0 Members and 1 Guest are viewing this topic.

Offline bardosy

  • Honoured Contributor
  • ***
  • campaign designer
    • CartooDiv
1stAid sync to created unit?
« on: 03 Sep 2009, 17:33:26 »
How can I syncronize a sript created unit/group to the Firstaid module?


EDIT:
I found syncronizeObjectsAdd, but
Code: [Select]
leader grp_name syncronizeObjectsAdd [firstaidmodul_name]wont work.
« Last Edit: 03 Sep 2009, 18:23:01 by bardosy »
Fix bayonet!

Offline SaOk

  • Missions Depot Staff
  • *****
    • My youtube profile
Re: 1stAid sync to created unit?
« Reply #1 on: 03 Sep 2009, 18:34:24 »
I had the same problem last week but I managed to find solution - Adding these three lines enable all three "first aid"-modules for the group (You may still need to place the modules on map):

Code: [Select]
nul=[groupname] execVM "\ca\Modules\AIS\data\scripts\IS.sqf";
nul=[groupname] execVM "\ca\Modules\BC\data\scripts\BC.sqf";
nul =[groupname,leader groupname,true] execVM  "\ca\Modules\FA\data\scripts\FA.sqf";

« Last Edit: 03 Sep 2009, 18:43:37 by SaOk »

Offline Inkompetent

  • Members
  • *
Re: 1stAid sync to created unit?
« Reply #2 on: 03 Sep 2009, 21:04:35 »
Nice find! Note though that the First Aid Simulation module and First Aid Module shouldn't be used together. Just one or the other.

Offline Le_CuLtO

  • Members
  • *
Re: 1stAid sync to created unit?
« Reply #3 on: 04 Sep 2009, 07:41:57 »
Quote
nul=[groupname] execVM "\ca\Modules\AIS\data\scripts\IS.sqf";
nul=[groupname] execVM "\ca\Modules\BC\data\scripts\BC.sqf";
nul =[groupname,leader groupname,true] execVM  "\ca\Modules\FA\data\scripts\FA.sqf";

nice !
where do you exec that code ?
on the server, players who are in the group ? (I want to use this on a pvp mission)

Offline SaOk

  • Missions Depot Staff
  • *****
    • My youtube profile
Re: 1stAid sync to created unit?
« Reply #4 on: 04 Sep 2009, 11:23:22 »
I have no experience on MP scripting but I only exec(ed) those three lines once (in FSMscript) for each group. I think you can exec it from anywhere (triggers/sqs/sqf) but if it requires the modules placed on map (and they work same way as ambiet modules with startup time) then the init.sqf and unit-initbox could be too early.

Here is the orginal post where I found the lines for MP:
http://forums.bistudio.com/showpost.php?p=1396448&postcount=10

I followed the same root with pboview and found the scripts for SP.
« Last Edit: 04 Sep 2009, 13:02:30 by SaOk »

Offline bardosy

  • Honoured Contributor
  • ***
  • campaign designer
    • CartooDiv
Re: 1stAid sync to created unit?
« Reply #5 on: 04 Sep 2009, 11:24:31 »
Thank you SaOK!!! It was a huge help!
Fix bayonet!