Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.

Is this interesting enough to add more functions? i.e. change handle, extend stock, laser sight, more guns
Yes
 100%  [ 2 ]
No
 0%  [ 0 ]
Total Votes : 2

Just a simple program with a slightly customizable M4A1

prgmSCOERASE (Scope Erase)

Code:

:For(A,34,39
:Line(22,A,35,A,0
:End


prgmDRAWM4A1 (Draw M4A1)
Because this program consists almost entirely of line coordinates they will simply be listed like #-#-#-#-# for my sake. I don't want to write every single Line( thing.
Key:
Four arguments: Line command
Five arguments: Erase Line command
Two arguments: Pt-On( command


Code:

PROGRAM:DRAWM4A1
//Stock
1-31-1-29
2-32-12-32
2-28-12-28
4-33-8-33
3-27-3-26
3-25-8-27
8-26
8-25-10-27
11-31-15-31
11-29-15-29
11-30-15-30
12-30-14-30-0
//Handle & Body
16-32-20-32
16-28-18-27
18-28-16-20
16-20-19-19
20-19-22-27
22-28-42-28
24-27-36-27
24-26-36-26
24-25-36-25
26-27-26-25-0
25-25-25-25-0
27-24-35-24
22-23-32-23
//Magazine
29-22-31-14
31-14-36-16
36-16-34-24
31-22-32-17
33-16
32-20
31-20-31-20-0
//Scope
20-33-42-33
22-27-22-35
23-39-23-34
23-36-23-35-0
24-37-27-37
28-36-29-36
30-36-31-37
32-37-34-39
35-39-35-34
26-34-33-34
28-34-31-34-0
33-35
//Systems
23-31-34-31
23-30-34-30
27-31-28-31-0
25-30-28-30-0
//Handle
43-32-44-32
43-29-44-29
44-33-54-32
44-28-54-28
46-32-46-29
48-32-48-29
50-32-50-29
52-32-52-29
47-27-51-27
47-26-51-26
49-26-49-26-0
48-25-48-20
49-20-51-20
50-25-50-21
49-24
49-22
//Barrel & Muzzle
54-32-58-32
54-29-68-29
58-32-61-35
62-36-63-36
64-36-64-32
60-32-62-34
61-32-62-33
62-32
65-32-69-32
65-31-79-31
65-30-79-30



Code:

PROGRAM:GUNCLUB
:ClrDraw
:0→Xmin:94→Xmax
:0→Ymin:62→Ymax
:AxesOff
:CoordOff
:ExprOff
:Lbl 1
:ClrHome
:Menu("  THE GUN CLUB  ","[EXIT]",θ,"ABOUT",AB,"USAGE",US,"M4A1",M4
:Lbl θ
:ClrDraw
:ZStandard
:AxesOn
:CoordOn
:ExprOn
:Stop
:Lbl AB
:Output(1,1,"THE GUN CLUB
:Output(2,1,"LIKEAWHISPER
:Output(8,10,"V.1.2.1
:Pause
:Goto 1
:Lbl US
:ClrHome
:Output(1,1,"THE GUN CLUB    GIVES YOU A GUN THAT CAN BE     CUSTOMIZED AT   WILL. USE THE   MENUS TO ADD OR REMOVE ITEMS.
:Pause
:ClrHome
:Goto 1
:Lbl M4
:1→X
:Menu("    THE M4A1    ","[RETURN]",1,"SEE MY GUN",S,"SIGHTS",SI
:Lbl S
:RecallPic 0        //be sure that the m4a1 picture is stored as the picture variable. Since other people store pictures this can be whatever picture variable you want.
:Pause
:Goto M4
:Lbl SI
:If X=1
:Then
:Menu("SIGHTS","IRON SIGHT",1I,"RED DOT",1R,"ACOG",1A
:Lbl 1I
:prgmDRAWM4A1
:prgmSCOERASE
:Line(24,34,31,34
:Line(24,35,31,35
:Pt-On(24,36
:Pt-On(26,36
:StorePic 0
:Pause
:Goto M4
:Lbl 1R
:prgmDRAWM4A1
:prgmSCOERASE
:Line(24,34,34,34
:Line(25,35,34,35
:Line(27,35,29,35,0
:Line(26,36,26,37
:Line(27,38,29,38
:Line(30,37,30,36
:Pt-On(28,36
:StorePic 0
:Pause
:Goto M4
:Lbl 1A
:prgmSCOERASE
:RecallPic 1      //Should be the original M4A1
:StorePic 0
:Pause
:Goto M4


That's my code! If you're bored enough to make this feel free to make whatever modifications you would like as long as 1) you inform me if it is a positive adjustment and 2) you keep my credits page if you are showing someone else.

The great thing about graphic programs like these is that regardless of your skill level you have to "stoop down" to plain coding coordinates. It makes beginners like me feel better Razz

Thanks for reading this, and again please comment any thoughts, comments or modifications you make. And please answer the poll!
cool, what exactly is it? A 2D gun library or something? Is it ok if I port it to PRIZM?
This is actually really cheap, just a 2D gun that is slightly customizable. I'm working on more functions but it's still taking time. All it does right now is show an assault rifle, and using menus you can change the kind of sight it has.

As for Prism, I don't know what that is so I'll say no.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are GMT - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement