Jump to content



Photo
* * * * * 1 votes

Essential FPS game scripts

Programming Games Code

  • Please log in to reply
No replies to this topic

#1 FrankJ

FrankJ

    Newbie

  • Members
  • Pip
  • 4 posts
  • Gender:Male

  • Calculators:
    CASIO fx-9750GII (Hand-Me-Down From Sister)

Posted 19 January 2021 - 12:13 AM

To make a mouse:

//Setup

11->X
4->Y
Lbl 1
ClrText

//Clickdetector

If Getkey=31
Then Locate X,Y,"×"
1->C
Else Locate X,Y,"∘"
0->C
IfEnd

//Updatelocation

If Getkey=38
Then If X≠1
Then X-1->X
IfEnd
Goto 2
Else If Getkey=28
Then If Y≠1
Then Y-1->Y
IfEnd
Goto 2
Else If Getkey=37
Then If Y≠7
Then Y+1->Y
IfEnd
Goto 2
Else If Getkey=27
Then If X≠21
Then X+1->X
IfEnd
Goto 2
IfEnd
Lbl 2

//Delay

For 1->Z To 60
Next
Goto 1  

To make a gliding dot, make the following tweaks:

-> Change delay to 40

-> Duplicate the //Updatelocation section

-> On the first one replace X+1->X, X-1->X, Y+1->Y, Y-1->Y each with Getkey->D

-> At the top, Insert the line 0->D

-> On the second //Updatelocation Section, replace every Getkey with D

-> Replace the //Clickdetector with Locate X,Y,"∘"


Edited by FrankJ, 07 February 2021 - 07:09 AM.






Also tagged with one or more of these keywords: Programming, Games, Code

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users