|
How can I use a clicked key to trigger a panel?
#228548
09/20/08 13:00
09/20/08 13:00
|
Joined: Jun 2006
Posts: 35 Texas
DancesWithLight
OP
Newbie
|
OP
Newbie
Joined: Jun 2006
Posts: 35
Texas
|
I'm writing a game in A6 standard. Please don't ask me to upgrade now. I bought it in 2005 and am finally catching on how to write WDL. I'm not a good programmer, but I can create panels. I understand the number of a key corresponding to a door is Skill 4.
My question is, I would like to have 8 panels, each one appearing when a particular key is found. How do I write ACTIONS to show 8 different panels when their key is found? Like game_panel_1, game_panel_2 corresponding to key 1, key 2, and so on? The artworks would be like a reward for finding the key, like a bishoujo game. In my case they'd advance the story, and have to be found in order. Also they have text on them.
I know how write panels in WDL and how to put a button on a panel so the player can close the panel and go back to the level. I'm not clear on how to write an action that makes a panel triggered by clicking on a key. I want to associate for example, game_panel_1.visible on, with clicking key one. Instead of activating locked doors you see. No locked doors in my game so door keys arent' needed.
Help please? Thanks
Waiting for fully immersible Virtual reality.
|
|
|
Re: How can I use a clicked key to trigger a panel?
[Re: JazzDude]
#228573
09/20/08 17:34
09/20/08 17:34
|
Joined: Jun 2006
Posts: 35 Texas
DancesWithLight
OP
Newbie
|
OP
Newbie
Joined: Jun 2006
Posts: 35
Texas
|
Thanks, Jazz Dude, Really.
I have no problem writing a function to show a panel. I need an action to attach to a key object. Right? So if the player finds and clicks on that object, a panel will open. Thats what I need, and action to attach to a key! But thanks for answering so quickly.
AB
Waiting for fully immersible Virtual reality.
|
|
|
Found an answer to triggering a panel to show.
[Re: DancesWithLight]
#228584
09/20/08 18:33
09/20/08 18:33
|
Joined: Jun 2006
Posts: 35 Texas
DancesWithLight
OP
Newbie
|
OP
Newbie
Joined: Jun 2006
Posts: 35
Texas
|
Hang on, I found an answer. I looked in AUM wdl resources and found the code below. I should be able to change it for my purpose:
/// a touch and show panel wdl by Dreamkiller and Realspawn
///////////////Bmaps///////////////// bmap test_for_5sec = <test.bmp>; (or your own file name) //////////////Panels////////////////////
Panel test_panel { Layer 2; bmap = test_for_5sec; flags = refresh,d3d,transparent; }
string textap_str = "You did it !";
text you_did { pos_x = 300; pos_y = 240; font = standard_font; string = textap_str; layer = 10; flags = transparent, d3d, center_x, center_y, narrow; }
///////////////////new///////////// function text() { set you_did.visible,on; set you_did.visible,on; waitt(80); set test_panel.visible,off; set you_did.visible,off; wait(1); } }
ACTION Show_pictext { SET MY.ENABLE_IMPACT, ON; SET MY.EVENT text; }
Waiting for fully immersible Virtual reality.
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|