Results 1 to 5 of 5

Thread: help with rpg

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2000
    Posts
    20

    Post

    if the energy is 100 and then you defeat a enemy then you get more energy but how do i get the new energy in an other form.


  2. #2
    New Member
    Join Date
    Feb 2000
    Posts
    2

    Post

    Say your original energy is the value in lable1 on form1. After defeating the enemy, your form1.visible = false, and form2.visible = true. On form2 you have another label1 for the new energy level. Here is how I would do it:
    'new energy label
    'x = the desired increasing amount
    label1.caption = val(form1.label1 + x)

  3. #3
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088

    Post

    Well, this will work but it's a very stupid way.
    Add a module where you can declare global vars so you can use them on each form.

    -
    'In module
    Global A as Long

    'In any form
    A = 10

    'In another form
    Caption = A
    -

  4. #4
    New Member
    Join Date
    Mar 2000
    Location
    Perham, MN, USA
    Posts
    1

    Post Use Global

    Go to a module and say:

    Global energy as integer


    then your variable will work in every form.

    Easy as pie

  5. #5
    New Member
    Join Date
    Sep 1999
    Location
    Sydney
    Posts
    10

    Post

    Private Sub Form2_Load()
    lblENG.Caption = Form1.lblENG.Caption
    End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width