Home   Help Search Login Register  

Author Topic: Simple recruit script not working  (Read 2563 times)

0 Members and 1 Guest are viewing this topic.

Offline ual002

  • Members
  • *
Simple recruit script not working
« on: 20 Jul 2010, 22:31:32 »
1. Ok, i just want to be able to go to a building and use action menu to recruit a soldier to my group.  It works but the portion that defines the ini is throwing errors.  IE recieved code, expected string.  So I get the solider but with default weapons.  Why?

2. For MP how can I allow any group leader to go to a building and recruit?

This is in the ini of the building
Quote
this addAction ["Recruit", "spawntent.sqs"];

This is what is in the script
Quote
"US_Soldier_EP1" createUnit [getMarkerPos "recruitpoint", Alpha1,"this removeweapon {SCAR_L_STD_HOLO}; this addweapon {m16a4}", 0.6, "corporal"]

EDIT

Fixed issue 1 by using this script

Quote
_unit = alpha1 createUnit ["US_Soldier_EP1", getMarkerPos "recruitpoint", [], 0, "none"];



_unit removeweapon "SCAR_L_STD_HOLO"; _unit addweapon "m16a4";  setPlayable _Unit

However, issue 2 is still eluding me.  Also, a 3rd issue arises.

3. setplayable _unit throws no errors but when I hit "T" for teamswitch in the multiplayer game the new unit is not MP playable.  addSwitchableUnit _Unit does not work either
« Last Edit: 20 Jul 2010, 23:26:42 by ual002 »