Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > Game Programming > Final Fantasy Battle System Help


Reply
 
Thread Tools Display Modes
  #1  
Old 03-05-2004, 11:11 AM
bubbabalboa bubbabalboa is offline
Newcomer
 
Join Date: Mar 2004
Posts: 16
Default Final Fantasy Battle System Help


I'm currently designing my own battle system through VB. Everything is going well except for one thing. I have the main form which has all the command buttons like "attack", "defend", magic, and items. when you click on items a new form is loaded off to the side. I have it set to where when you click on one of the items in the listbox, a brief description is desplayed in a label directly above it.

Can someone please help me out with this...HOW DO I SET IT TO WHERE WHENEVER ONE OF THE ITEMS IN THE LIST BOX IS DOUBLE-CLICKED, IT WILL CAUSE AN ACTION IN THE MAIN FORM?
Reply With Quote
  #2  
Old 03-05-2004, 11:44 AM
Iceplug's Avatar
Iceplug Iceplug is offline
MetaCenturion

Retired Moderator
* Guru *
 
Join Date: Aug 2001
Location: California, USA
Posts: 16,583
Default

As long as you know how to do the action, you can just make a public subroutine on your main form.
Code:
Public Sub ItemClickBack() ... End Sub
When you double-click an item in the listbox, the name of the item will be in the .Text property, and the index of the item in the .ListIndex property.
So, you can do this in the DblClick event of the listbox.
You may also want to make the public subroutine take a parameter for the item that was clicked in the listbox.

P.S. Typing in capital letters is scientifically proven to be harder to read.
__________________

Iceplug, USN
Quadrill 1 Quadrill 2 (full) Quadrill 3 JumpCross .NET Website is ALIVE! - DL Platform Tour for VB.NET! Posting Guidelines Hint: Specify your location in your user cp profile if you want compassion!
Reply With Quote
  #3  
Old 03-07-2004, 11:14 PM
bubbabalboa bubbabalboa is offline
Newcomer
 
Join Date: Mar 2004
Posts: 16
Default String and other variables

OK, I do understand what Iceplug is saying. How would I identify strings that are located in the main form from the item form.

EX: strtstrength - randomly generated number located in main form

If you could show me an example of how I would use the double-click button on the item form (frmtitem) to add 10 to strtstrength.

Thanks a lot, any help will be appreciated greatly, and recognition will be given in final update of game.
__________________
If there were no Final Fantasy, there would be no point in life...agree?
Reply With Quote
  #4  
Old 03-08-2004, 02:15 AM
QuantumCat's Avatar
QuantumCat QuantumCat is offline
Senior Contributor
 
Join Date: Aug 2003
Location: Dordrecht,Holland
Posts: 858
Default

I don't really understand whatyou want, but is it this?

main form (e.g. frmMain)
Code:
'there is text box 'text1.text"
sub form (frmAction)
Code:
'action to set text1.text to a certain value, say command1, a command button
Your vb code in the sub form (frmAction) would be:
Code:
private sub command1_click()'action to set text1.text to a certain value, say command1, 
a command button
frmMain.text1.text = "new value"
end sub
QC
__________________
Your theory is crazy, but it's not crazy enough to be true.
Reply With Quote
  #5  
Old 03-08-2004, 07:21 AM
Iceplug's Avatar
Iceplug Iceplug is offline
MetaCenturion

Retired Moderator
* Guru *
 
Join Date: Aug 2001
Location: California, USA
Posts: 16,583
Default

If you have declare StrtStrength as Public in your main form, then you can access the variable by including the name of the form and then a period.
Let's say that you named the form to be Form1 and you want to access StrtStrength.
Form1.StrtStrength = Form1.StrtStrength + 10
will increment StrtStrength on Form1 by 10.
__________________

Iceplug, USN
Quadrill 1 Quadrill 2 (full) Quadrill 3 JumpCross .NET Website is ALIVE! - DL Platform Tour for VB.NET! Posting Guidelines Hint: Specify your location in your user cp profile if you want compassion!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Battle System Question lakau Game Programming 2 02-13-2004 06:36 AM
Tribute to Final Fantasy (My first RPG) DKnight Game Programming 0 02-01-2002 07:45 PM
Fantasy Battle Arena Simulator -- Sign Up! JDYoder Game Programming 23 10-09-2001 09:42 AM
Final Fantasy speed bar punk Game Programming 3 10-07-2000 04:18 PM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->