Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 11 of 11
  1. #1
    Join Date
    Jul 2007
    Posts
    1,512

    Gaming Engin Version 0 HELP

    Hey all i was board again and i wanted to this time go a GE my self from scratch
    wat was all fine until i tryed doing this

    EG
    Perload for firefire


    Globle:

    Code:
    X = {};
    X.FF = 0;
    X.Health = 100;
    ""
    All good but i want to editing the glodle stats with one funtion EG

    Code:
    X.UpdateGS = function(sUpdate)
    	X.sUpdate = X.."."..sUpdate;
    	X.sUpdate = X.sUpdate+1;
    	Label.SetText("Label1", "Health: "..X.Health.." Hunger: "..X.Hunger.." Ammo: "..X.Ammo.." Weapon: "..X.Weapen_Is.." Hidden Gem's: "..X.Hidden_Gems);
    end;
    Also Tried

    Code:
    X.UpdateGS = function(sUpdate)
            X.U = sUpdates
            X.sUpdate = X.."."..X.U;
    	X.sUpdate = LuaX.sUpdate+1;
    	Label.SetText("Label1", "Health: "..X.Health.." Hunger: "..X.Hunger.." Ammo: "..X.Ammo.." Weapon: "..X.Weapen_Is.." Hidden Gem's: "..X.Hidden_Gems);
    end;
    Preload
    Code:
    X.UpdateGE(FF);
    How do i get X and sUpdate to = X.FF or X.what eva sUpdate is set as?

    Thanks

  2. #2
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    Code:
    X.UpdateGS = function(sUpdate)
    	if X[sUpdate] then
    		X[sUpdate] = X[sUpdate]+1;
    		Label.SetText("Label1", "Health: "..X.Health.." Hunger: "..X.Hunger.." Ammo: "..X.Ammo.." Weapon: "..X.Weapen_Is.." Hidden Gem's: "..X.Hidden_Gems);
    	end
    end;

  3. #3
    Join Date
    Jul 2007
    Posts
    1,512
    So i don't need the . then ? .. ok i try this now thankis worm

  4. #4
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    Lua let's ref the tables in different ways. This is probably not the only way to do it, but its what I'm familiar with.

  5. #5
    Join Date
    Jul 2007
    Posts
    1,512
    Another problem where is the best place to stick the states that the game engin will need
    X.FF =0;
    X.Heath = 100;

    so on are not showing in the Lable?

  6. #6
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    not sure I understand what you are asking.

  7. #7
    Join Date
    Jul 2007
    Posts
    1,512
    X.Health = 100;
    X.Hunger = 0;
    X.Ammo = 0;
    X.Weapen = 0;
    X.Hidden_Gems = 0;
    X.FF = 0;

    It dose not update unles is X.[sUpdate] ?
    I wanted to set them globle so when i have complated the engin people will be able to make games on top of the engine.

  8. #8
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    If you're saying you want to give them an initial value, then put them in the Global Functions, but not within a function. Or you could put them in a function called InitVars() or something like that.

  9. #9
    Join Date
    Jul 2007
    Posts
    1,512
    Quote Originally Posted by Worm View Post
    If you're saying you want to give them an initial value, then put them in the Global Functions, but not within a function. Or you could put them in a function called InitVars() or something like that.
    I will send you the APZ in a PM as its also my Point and click what i dont what to give out until complete lol :P you will see what i mean

  10. #10
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    Line 13 in the Globals, change to

    LuaX.Weapen_Is = "None";

  11. #11
    Join Date
    Jul 2007
    Posts
    1,512
    That simple? OK thanks lol i will try that :P this is a long term project so i guess there will be other little problems like this thanks worm/

Similar Threads

  1. Unable to find software?
    By NigelLacey in forum Visual Patch 2.0
    Replies: 4
    Last Post: 10-11-2005, 10:35 AM
  2. Sorry quick question Boolean
    By slafta in forum AutoPlay Media Studio 5.0
    Replies: 3
    Last Post: 06-05-2005, 12:37 AM
  3. HOWTO: Open a Version 3.0 Project in Version 4.0
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-30-2002, 02:09 PM
  4. HOWTO: Detect Acrobat Version
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-22-2002, 04:01 PM
  5. INFO: Moving from the Trial Version to Commercial Version
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-07-2002, 08:52 AM

Posting Permissions

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