Home   Help Search Login Register  

Author Topic: Need help with listbox dialogue at start of mission  (Read 616 times)

0 Members and 1 Guest are viewing this topic.

Offline Ranger

  • Members
  • *
  • Hoo-ah!
Need help with listbox dialogue at start of mission
« on: 02 Nov 2002, 20:22:05 »
I'm trying to create a listbox dialogue at the start of a mission just like the ones in the BIS-created MP territorial control missions, where you can select a parameter such as length of the mission, maximum score, and that sort of thing.

I unPBO'd 2-12_T_SECTORCONTROL.EDEN.PBO and looked at what they did in the description.ext, then put in similar code in my mission.  However, it doesn't work.  The dialogue appears when I start the mission in MP, and the list looks correct.  However, I am unable to selection anything other than the first item on the list.  If I try clicking on anything else, the cursor highlights the selected item, then immediately jumps back to highlighting the first item.  Below is the code I am using in description.ext:

titleParam1 = "Spotter";
valuesParam1[] = {p1, p2, p3, p4};
defValueParam1 = p1;
textsParam1[] = {"Alpha Black 1", "Alpha Black 2", "Alpha Black 3", "Alpha Black 4"};


What's am I doing wrong?
Ranger

Offline Ranger

  • Members
  • *
  • Hoo-ah!
Re:Need help with listbox dialogue at start of mission
« Reply #1 on: 04 Nov 2002, 18:48:42 »
Anyone?

I forgot to mention that even with the first item selected (the only one I can select), even that doesn't work.  That is, the value of the first item isn't carried into the game.  So, if I try to utilize "param1", the game thinks it has no value.
Ranger

Offline Zombie

  • Members
  • *
  • Beware the night, the zombie walks among you
    • USI
Re:Need help with listbox dialogue at start of mission
« Reply #2 on: 05 Nov 2002, 12:15:46 »
Try this, It works for me.  I have never tried to change the unit "color" but the time and score selection works.  Hope this helps

titleParam1 = "Time:";
valuesParam1[] = {10000, 1, 300, 600, 900, 1200, 1500, 1800, 2700, 3600, 7200};
defValueParam1 = 1800;
textsParam1[] = {"Unlimited","1 Min", "5 min", "10 min", "15 min", "20 min", "25 min", "30 min", "45 min", "1 hour", "2 hours"};

titleParam2 = "Score to win:";
valuesParam2[] = {10000, 1, 5, 7, 10, 15, 20, 25, 30};
defValueParam2 = 5;
textsParam2[] = {"Unlimited", 1, 5, 7, 10, 15, 20, 25, 30};

Offline Ranger

  • Members
  • *
  • Hoo-ah!
Re:Need help with listbox dialogue at start of mission
« Reply #3 on: 05 Nov 2002, 21:36:27 »
Thanks, but that's not what I'm trying to do.  Your code should work just fine *if* was making a mission that had a variable time limit and maximum score.

However, my mission is not a deathmatch mission, has no time limit, and no maximum score.  Instead, what the player is selecting is which unit in a 4-man group will be the spotter for artillery.  Thus, the values in my example code (p1 through p4) are the names of player units.

Maybe that's the problem.  Maybe this dialogue box cannot be used to choose a unit.

Thanks, though.
Ranger