Jump to content

Recommended Posts

Posted (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 by ryao

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

Posted

I wouldn't use the message system. You can call functions directly from other scripts, like gun:Shoot().

My job is to make tools you love, with the features you want, and performance you can't live without.

Posted

thanks,

did not know that

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

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...