Home   Help Search Login Register  

Author Topic: problem with a weaponloadout  (Read 495 times)

0 Members and 1 Guest are viewing this topic.

Offline Blanco

  • Former Staff
  • ****
problem with a weaponloadout
« on: 27 Feb 2005, 11:12:22 »
In a dialog you can choose your role in the mission, when you press the button "Machinegunner", the dialog closes and this script starts to run :

setup_Charlie.sqs
Code: [Select]
cuttext ["","Black in",3]
situation = 2
player AddMagazine "BARMag"
player AddWeapon "BAR"
player AddMagazine "BARMag"
player AddMagazine "BARMag"
player AddMagazine "BARMag"
player AddMagazine "BARMag"
player AddMagazine "HandGrenade"
player AddMagazine "HandGrenade"
player AddWeapon "Binocular"
~2
[player] join fransgroup
SDF setdammage 0.5
player setpos [(getpos frans select 0) + (5*sin getdir frans), (getpos frans select 1) + (5*cos getdir frans), 0]

"_x setskill 0.5+ random 0.3" foreach (units marcelgroup + units jefgroup)

jefgroup setGroupId ["ALPHA", "GroupColor1"]
marcelgroup setGroupId ["BRAVO", "GroupColor1"]
fransgroup setGroupId ["CHARLIE", "GroupColor1"]
~3

exit

When the game starts, I'm in the right position, the right group, the right weaponloadout... but I can't fire my weapon until a select one of my weapons. It looks like the ammo for the weapon is not available before a select another weapon then one I'm holding. (like the binocular).
 :'(


Anybody experience with this?

**edit**

OK I solved it :  :)
After the adding the weapons and magazines..


Code: [Select]
player selectweapon "binocular"
~2
player selectweapon (primaryweapon player)
~2

And at the end of the script...

Code: [Select]
player action ["WEAPONINHAND"]
exit

But I still don't know why this happens...
 
« Last Edit: 27 Feb 2005, 11:28:46 by Blanco »
Search or search or search before you ask.