Andr3wHur5t Posted April 27, 2010 Share Posted April 27, 2010 (edited) Hi so i am working on a ammo variables system and what i have come up with seems complacated. dose anyone have a more effecent idea \---z = 1 \---clip = 30 \---ammo = 300 \---reloadstart = ??? \---reloadend = ??? \---reloadk = ??? \--------------if RecevedMessage(gun,"shot") then \------------------clip=z-clip \------------------if clip = 0 then \---------------------if ammo = 0 then \------------------------notify(out of ammo,x,y) \------------------------end \---------------------if else then \------------------------PlayAnmationFrames(player,reloadstart(),reloadend()) \------------------------if anmationFrame(player,Reloadk) then \-----------------------> ammo = ammo-z \-----------------------| clip = clip+z \-----------------------| if clip() = clipfull() then \-----------------------| end \-----------------------| if else then \-----------------------| if ammo = 0 then \-----------------------| end \-----------------------> if else then the script betwen the > and | are suposed to be repeeted how meny bullets there are in a clip Edited April 27, 2010 by ryao Quote Tools: AC3D | 3D Canvas(pro) | Texture Maker(pro) | Genetica(basic) | 3D World Studio | Fragmotion |Leadwerks 2 | XNA 4 | Visual Studio 2010 Professional | XCode 5.x |UU3D Pro Programing & Scripting Languages: C |C++ | C# | Obj-C | LUA | Javascript | PHP | Ruby Link to comment Share on other sites More sharing options...
Josh Posted April 27, 2010 Share Posted April 27, 2010 I wouldn't use the message system. You can call functions directly from other scripts, like gun:Shoot(). Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Andr3wHur5t Posted April 27, 2010 Author Share Posted April 27, 2010 thanks, did not know that Quote Tools: AC3D | 3D Canvas(pro) | Texture Maker(pro) | Genetica(basic) | 3D World Studio | Fragmotion |Leadwerks 2 | XNA 4 | Visual Studio 2010 Professional | XCode 5.x |UU3D Pro Programing & Scripting Languages: C |C++ | C# | Obj-C | LUA | Javascript | PHP | Ruby Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.