Home   Help Search Login Register  

Author Topic: A kind of PDA  (Read 986 times)

0 Members and 1 Guest are viewing this topic.

Hfarl

  • Guest
A kind of PDA
« on: 12 Jul 2006, 16:23:23 »
Hi!
I'm making this story driven mission, and I intended to make some sort of PDA for the player, to gather "notes" on the goings on throughout the game.
I've read Vekterbosons dialog tut, but I'm having some trouble getting my head around how to get it to "read" data.

Basically, I want a simple dialog that is activated from the action menu, which contains two fields. One with a list of all the entries (a menu), and the other which shows the selected entry. The entries themselves will contain just bits of text (like for instance, if the player finds a page from a diary in an abandoned building, it's added to the PDA as an entry which can be accessed and read later on. So in the menu field of the PDA it would say "Diary page from abondoned building", and if you click it, it would display the text from the page in the other field).

So I guess, all the "entries" for a mission will be prewritten, and "unlocked" in the PDA by global triggers, or something like that. (ie. when you find the diary page, you actually enter a 1 meter radius trigger, that sets off a "diarypage1found = true" variable which unlocks the corresponding entry in your "pda", and gives you a hint which says "You found an old diary. Added to PDA".)

So, It'd be great if someone could give me some pointers on how to construct this (it should be pretty simple, right?)

Thanks in advance!

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: A kind of PDA
« Reply #1 on: 12 Jul 2006, 17:32:49 »
yes, it's doable, and yes, pretty simple once you get a handle on the concept.

the available documents would be in a drop-down box for easy selectability. you can populate a dropdown box at any time according to variables using lbSetData. the separate documents could be done a number of ways but i would suggest the following.

create your pda dialog graphics. i'm assuming it would be some sort of lcd touch-screen thing, as that fits in with the drop-down box idea and hyperlinks etc...

next, create a single dialog with the dropdown box on it, an 'ok' and a 'cancel' button. cancel will close the dialog and resume play, ok will run a script.

that ok script will ascertain which option was chosen in the dropdown box using lbCurSel, and then close the menu dialog, opening an identical-looking new dialog using the same graphics, but containing the chosen information, as well as 'back' and 'cancel' buttons. you'd have to make a separate dialog for each bit of information you decide to store on the pda, but this method will give you the most control over how each of the dialogs look.

vektorboson's tute will show you how to do all of this.
« Last Edit: 12 Jul 2006, 17:37:55 by bedges »

Offline SniperAndy

  • Members
  • *
    • VBS Community
Re: A kind of PDA
« Reply #2 on: 13 Jul 2006, 08:36:59 »
what a excellent idea.../me looking for vectorbosens tutorial again.
If you got this working mate, please post the basic PDA etc here if you like to share it.

Hfarl

  • Guest
Re: A kind of PDA
« Reply #3 on: 13 Jul 2006, 14:43:03 »
Thanks for the tips bedges, I think I can get this thing to work now.
And I'm glad you like the idea SniperAndy, I'll release it to the community for sure (as long as I get it to work :P)
Been around the ofp crowd for years, so it would be great to finally give something back :)

I'll keep you posted.

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: A kind of PDA
« Reply #4 on: 13 Jul 2006, 19:04:11 »
not to be self-advertising or anything, but if you need an example have a look at this thread.

it has the 'reading data' stuff you were on about. feel free to take the scripts apart, and look for the lbSetData and lbCurSel bits, specifically in the equipment dialog - reading an array of available weapons, populating a dropdown box with those values, then ascertaining which one the player has chosen.

you might also find the satcom dialog useful for pda display ideas.