Home   Help Search Login Register  

Author Topic: array in description.ext for dialog  (Read 1104 times)

0 Members and 1 Guest are viewing this topic.

Offline Seven

  • Members
  • *
  • Am I a llama?
array in description.ext for dialog
« on: 21 Sep 2006, 19:06:06 »
Hi,

I managed to make my first respawn dialog where the player gets to choose a predifined loadout.
But I get an error when triying to pass this:

Code: [Select]
  class BUTTON1 : RscButton
  {
          x = 0.25;
  idc=-1
          y = 0.42;
          w = 0.2;
          h = 0.04;
          text = "MG SOLDIER";
    action = "[player, "MG"] exec ""rearm.sqs"""
    default = false
  };

which would do:

Code: [Select]
_unit = _this Select 0
_type = _this Select 1

_unit addEventHandler ["killed",{_this exec "playerkilled.sqs"}]

RemoveAllWeapons _unit

?(_type == "MG"): Goto "MG"
?(_type == "grenadier"): Goto "grenadier"
?(_type == "AT"): Goto "RPG"

And so on...



Can anybody give me some advice on this or help me out?
All help apreciated.

Greetz

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re: array in description.ext for dialog
« Reply #1 on: 21 Sep 2006, 19:37:33 »
Quote
action = "[player, "MG"] exec ""rearm.sqs"""

You got did right with ""rearm.sqs""", but not with "MG".

Remember - " inside " rule.  ;)

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Offline Seven

  • Members
  • *
  • Am I a llama?
Re: array in description.ext for dialog
« Reply #2 on: 21 Sep 2006, 19:50:03 »
Cool thx I'll try this tonight!  :)

Offline Seven

  • Members
  • *
  • Am I a llama?
Re: array in description.ext for dialog
« Reply #3 on: 21 Sep 2006, 21:08:58 »
Great this works fine!

Thx Chris :)

Got one more question (thought might be better than making a new post for it so will do it here quickly):
How do I get flares I add to the units loadout to be in the part where the flaregun is and not where the rest of the magazines are?

Cheers!  :afro: