* Character
Author |
Message |
upthescale
|
Posted: Mon Apr 03, 2006 7:07 pm Post subject: * Character |
|
|
how do i do it so when the user has an input, instead of seeign wtu they write, u see a * instead of the letters they used..? |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
TokenHerbz
![](http://compsci.ca/v3/uploads/user_avatars/717170395558e628d9452b.jpg)
|
Posted: Mon Apr 03, 2006 7:28 pm Post subject: (No subject) |
|
|
let see, perhaps we can try getting the input, and instead of putting the variavle, we put "*"...
lets try somthin like:
code: |
var input : string (1) %%gets input
var user_pass : string := ""%%password
loop
%%this will get your character
getch (input)
if input = (KEY_ENTER) then
exit %%leaves the loop
end if
put "*" .. %%So you cant see the pass
%%and actually pass is getting stored here
user_pass += input
end loop
put user_pass
|
Ofcoure you can get more specific, like take out backspaces: etc:
Ill let you try to figure it out though, if you need help just ask! |
|
|
|
|
![](images/spacer.gif) |
upthescale
|
Posted: Mon Apr 03, 2006 7:31 pm Post subject: (No subject) |
|
|
it's fine man thanks tho yo ur a goodg uy....cud u tell me how to make a ball on the screen and bounc in a direction when it hits the top of the scren or bottom? |
|
|
|
|
![](images/spacer.gif) |
TokenHerbz
![](http://compsci.ca/v3/uploads/user_avatars/717170395558e628d9452b.jpg)
|
Posted: Mon Apr 03, 2006 7:49 pm Post subject: (No subject) |
|
|
Programming is about thinking... See you have to plan how your programs going to work befor you make it...
So if you want a ball to bound off the wall, which lets say is the left wall, thats at the x chord 0 right?
now, we need the balls chords..
code: |
var ballx: int
var bally: int
%x is for sideways, y is upand down
|
so now we can trace and draw the ball, useing its chords:
We need a speed variable which workds to "ADD" so much pixles to move the ball right / up, or +Minus+ them, to make it go left / down.
code: |
%%using negitive 2 because adding a negitive number subtracts the number makeing it move left
var ballxspeed: int := -2
var ballyspeed: int := -2
|
Lets start that ball 100 frames away from the xwall (0) and move it left to bounce off... we would need to reverse the direction by making the xspeed from neg to positive, we do this my timesing it by -1
code: |
View.Set ("offscreenonly") %%to use the update correctly
var ballx : int := 100 %%set it to 100
var ballxspeed : int := -2 %%set to go left
loop
cls
ballx += ballxspeed
%%we wont use y chords
if ballx <= 0 then %%when ball hits left wall
ballxspeed *= -1 %%this just makes the speed reverse, from pos to neg, vise versa
end if
%%draw your ball
drawfilloval (ballx, 100, 10, 10, 7)
View.Update
delay (20)
end loop
|
Try to get it to bounce off the right side, top, and bottom |
|
|
|
|
![](images/spacer.gif) |
upthescale
|
Posted: Mon Apr 03, 2006 8:14 pm Post subject: (No subject) |
|
|
thx man
[mod:059924824e="Cervantes"]
Conduct private matters privately, though the PM system, or over some other form of communication. Look at the nice little buttons under his post for ways to contact him.
[/mod:059924824e] |
|
|
|
|
![](images/spacer.gif) |
|
|