Help Basic
#1
Posted 14 April 2004 - 04:27 AM
understands himself(herself)? .-... I sit it but I am occupying a translator ... Hi would be grateful very much for his(its) help thank you
My English one is very bad
I might write the code please? Following(Continuing) the example
please please
#2
Posted 14 April 2004 - 07:15 AM
[0, 1, 2, ..., 9] -> [48, 49, 50, ..., 57]
-> [46]
EXP' /> -> [147]
-> [43]
-> [45]
[*] -> [60944] (multiply)
-> [47] (divide)
[=] -> [61]
[(, )] -> [40, 41]
-> [44]
[x, y, z] -> [60856, 60857, 60858]
-> [94]
EXE' /> -> [13]
[up, down, left, right] -> [28, 29, 30, 31]
[Keyboard] -> [144]
[Backspace] -> 8' />
[ON/OFF] -> [145]
[Clear] -> [12]
example :
Do
Getkey t
LpWhile t<56 Or t>57
If t=56
Then
RclPict pict1
Else
RclPict pict2
IfEnd
#3
Posted 14 April 2004 - 08:23 AM
up= kUP
1= k1
9= k9
On/Off= kON
Keyboard= kKEYB
EXE= kEXE
etc...
#4
Posted 14 April 2004 - 01:50 PM
#5
Posted 14 April 2004 - 02:16 PM
In one or two days they I will have another question .... my program is a bit rare(strange) and I am a beginner in programming later they will be able to see it
Again ...-thank you
#6
Posted 14 April 2004 - 03:38 PM
#7
Posted 14 April 2004 - 06:07 PM
Local k,pict,num SetBG Off SetAxes Off SetDispGCon Off SetCoord Off SetGrid Off SetLabel Off Cls Lbl show Do GetKey k LpWhile k<k1 or k>k9 Cls k-(k1-1)=>num ExpToStr num,num StrJoin "pict",num,pict isdef(pict) If RTN=1 Then RclPict #pict Else Print "Picture does not exist" IfEnd Goto show
#8
Posted 15 April 2004 - 10:39 PM
I have 20 photos that are a sequence .... I want to press the key 0 and to advance for the fotos and to press 1 to move back ... my code is very long and with mistakes ... I wait could help ... the standard basic library me does not work very well .... it does not recognize me any expressions .... because of it that me was not working your previous example ... to seeing if it(he,she) can do the code to me without the bookshop standar. - thank you-
#9
Posted 15 April 2004 - 10:58 PM
this assumes that your pictures are named pict1~pict20
Local k,pict,num SetBG Off SetAxes Off SetDispGCon Off SetCoord Off SetGrid Off SetLabel Off Cls 1=>num RclPict pict1 Lbl show Do GetKey k LpWhile k<49 or k>50 Cls If k=49 Then num+1=>num Else num-1=>num IfEnd ExpToStr num,tmp StrJoin "pict",tmp,pict RclPict #pict Goto show
this lets you use any names you want:
Local k,pict,num,plist {"pict1","pict2"}=>plist (fill this list wth the names of your pictures in the order you want them displayed) SetBG Off SetAxes Off SetDispGCon Off SetCoord Off SetGrid Off SetLabel Off Cls 1=>num plist[num]=>pict RclPict #pict Lbl show Do GetKey k LpWhile k<49 or k>50 Cls If k=49 Then If num=dim(plist) Then 1=>num Else num+1=>num IfEnd Else If num=1 Then dim(plist)=>num Else num-1=>num IfEnd IfEnd plist[num]=>pict RclPict #pict Goto show
this second example is more stable but requires a little more work as you must fill plist with the names of your pictures. it can however prevent you from trying to look at pictures above the total amout and below 1, instead jumping to the oppisite end of the list.
#10
Posted 15 April 2004 - 11:02 PM
#11
Posted 16 April 2004 - 12:09 AM
..... Probably tomorrow have another question .. always related with fotos. - .. I am making something rare
#12
Posted 16 April 2004 - 02:27 AM
can you tell us what your working on?
#13
Posted 18 April 2004 - 02:58 PM
I wish now that the cp chooses images at random .... I explain .... I have 20 picts ..... pict1 .. pict2 .. ect ... I need that when the key presses 1 the cp chooses at random the images .... mas exact a group of images .... for example ... if apreto 1 that aparesca of her(it) pict1 to the pict 6 .... or of the pict 7 to the pict 13 ... or of the pict 14 to her(it) pict20
Slightly this way ..... with regard to the code of before ... of post of before .... I need also that on having moved back not aparesca the pict finalizes..
#14
Posted 18 April 2004 - 03:28 PM
I need one more thing ... and it will be ready soon...
I wish now that the cp chooses images at random .... I explain .... I have 20 picts ..... pict1 .. pict2 .. ect ... I need that when the key presses 1 the cp chooses at random the images .... more exactly a group of images .... for example ... if i push 1 that appear of it pict1 to the pict 6 .... or of the pict 7 next the pict 13 ... or of the pict 14 to pict20
Slightly this way ..... with regard to the code of before ... of post of before .... I need also that on having moved back not appear the pict finalizes..
Well he need a random code for put images. The random command give you numbers between 0 and 1, you can put a switch~case for put an image depending the value of the random. But there must be a better way, wait for more posts .
#15
Posted 18 April 2004 - 07:21 PM
- randomly chosen groups of images in groups of 6.
i dont understand this:
"Slightly this way ..... with regard to the code of before ... of post of before .... I need also that on having moved back not appear the pict finalizes.. "
can you clarify?
#16
Posted 18 April 2004 - 07:48 PM
1 - asks . .... the code of the photos of more up ... the one that has plist ... his code is perfect but on having moved back in the first photo the last one goes out for me - .. I do not want it ... on having moved back in the first photo I want that it remain still ... the same thing for the last photo ... on having advanced the last photo the first one goes out.
2 - asks ... I need that the classpad chooses random photos ..... I have a group of photos .. 3 groups----.y when the key presses 0 that the classpad chooses random a group ... that is at random ... type artificial intelligence .. it..
#17
Posted 18 April 2004 - 08:21 PM
Local k,pict,num,plist,group,glist {"pict1","pict2","pict3","pict4","pict5","pict6","pict7","pict8","pict9","pict11","pict12","pict13","pict14","pict15","pict16","pict17","pict18","pict19","pict20"}=>plist {6,13,20}=>glist SetBG Off SetAxes Off SetDispGCon Off SetCoord Off SetGrid Off SetLabel Off Lbl show Cls rand(1,3)=>group for ((group-1)*6)+group=>num To glist[group] plist[num]=>pict RclPict #pict Next Do GetKey k LpWhile k=49 Goto show
#18
Posted 18 April 2004 - 09:32 PM
Only I ask for one more things him
Look at this that ud did
Local k,pict,num,plist {"pict1","pict2"}=>plist (fill this list wth the names of your pictures in the order you want them displayed) SetBG Off SetAxes Off SetDispGCon Off SetCoord Off SetGrid Off SetLabel Off Cls 1=>num plist[num]=>pict RclPict #pict Lbl show Do GetKey k LpWhile k<49 or k>50 Cls If k=49 Then If num=dim(plist) Then 1=>num Else num+1=>num IfEnd Else If num=1 Then dim(plist)=>num Else num-1=>num IfEnd IfEnd plist[num]=>pict RclPict #pict Goto show
The problem is that on having moved back it pict1 it jumps to the last pict .... of the same form - on having advanced the last pict, it appears pict1 .... there bothers it in my program...
I would wish having moved back it pict1 to remain still ...... and on having advanced the last pict that also remains there....
#19
Posted 18 April 2004 - 11:51 PM
Local k,pict,num,plist {"pict1","pict2"}=>plist (fill this list wth the names of your pictures in the order you want them displayed) SetBG Off SetAxes Off SetDispGCon Off SetCoord Off SetGrid Off SetLabel Off Cls 1=>num plist[num]=>pict RclPict #pict Lbl show Do GetKey k LpWhile k<49 or k>50 Cls If k=49 and num<>dim(plist) Then num+1=>num ElseIf num<>1 Then num-1=>num IfEnd plist[num]=>pict RclPict #pict Goto show
#20
Posted 26 April 2004 - 03:13 PM
The problem is that I have the code of this form ... for example..
Local k,pict,num,plist,group,glist {"pict1","pict2","pict3","pict4","pict5","pict6","pict7","pict8","pict9","pict11","pict12","pict13","pict14","pict15","pict16","pict17","pict18","pict19","pict20"}=>plist {6,13,20}=>glist SetBG Off SetAxes Off SetDispGCon Off SetCoord Off SetGrid Off SetLabel Off Lbl show Cls rand(1,3)=>group for ((group-1)*6)+group=>num To glist[group] plist[num]=>pict RclPict #pict Next Do GetKey k LpWhile k=49 Goto show
What I need is that if group=1 three times then I later could write another instruction
Since I write this?
#21
Posted 26 April 2004 - 03:44 PM
#22
Posted 26 April 2004 - 05:16 PM
Then when group the value has 1 three times ... I want to execute another command,
The real example is like that:
I am doing a game of you fight, then there is a random that it designates if the blow comes to the opponent or is covered .... if it strikes it, I it have 1 assigned to group in the random of value ... I want to achieve that if it strikes it three times then it works out winning ......
If you do not deal crimson I might order him(her) my program for MSN in order that I understand clearly what I want ......
And if it is possible. I might help to dwarfing the code and to make it more understandable..
I would be grateful for it to you very much...
#23
Posted 26 April 2004 - 08:34 PM
Local k,pict,num,plist,group,glist,glast,gcount {"pict1","pict2","pict3","pict4","pict5","pict6","pict7","pict8","pict9","pict11","pict12","pict13","pict14","pict15","pict16","pict17","pict18","pict19","pict20"}=>plist {6,13,20}=>glist 0=>gcount 0=>glast SetBG Off SetAxes Off SetDispGCon Off SetCoord Off SetGrid Off SetLabel Off Lbl show Cls rand(1,3)=>group If glast=group Then gcount+1=>gcount if gcount=3 Then goto exit IfEnd Else group=>glast 0=>gcount IfEnd for ((group-1)*6)+group=>num To glist[group] plist[num]=>pict RclPict #pict Next Do GetKey k LpWhile k=49 Goto show Lbl exit 'code here
#24
Posted 26 April 2004 - 10:56 PM
I write to him better my code ... actually it is this
SetBG p4 Cls Pause Local k,pict,num,plist,group,glist {"p5","p6","p7","p15","p15","p15","p16","p16","p17","p18","p19","p20","p22","p22","p23","p24","p25","p26","p4","p5","p6","p7","p101","p102","p102","p102","p103","p103","p104","p105","p106","p24","p25","p26","p4"}=>plist {19,35}=>glist Cls SetBG p2 Cls Wait 1 SetBG p3 Cls Wait 1 SetBG p4 Cls Lbl show Do GetKey k LpWhile k<8 If k=52 Then rand(1,2)=>group For ((group-1)*18)+group=>num To glist[group] plist[num]=>pict SetBG #pict Cls Next IfEnd Goto show
The picts of punch are of her p5 up to her p19 and them of covering punch from her p20 up to her p4 ... what I want is ... if it gives 3 punch that goes out another sequence separates .. does he understand me?
My game consists of the fact that if you strike the opponent three times at the time you win, in the sequence of covering punch the opponent covers ... I want to place the sequence of victory later that him of three punches
#25
Posted 26 April 2004 - 11:21 PM
#26
Posted 27 April 2004 - 01:35 AM
In my code ... it goes out
plist: two sequences of photos, one at one stroke towards the opponent and other one in which the opponent covers,
Blow: "p5", "p6", "p7", "p15", "p15", "p15", "p16", "p16", "p17", "p18", "p19"
Annulled blow: "p20", "p22", "p22", "p23", "p24", "p25", "p26", "p4", "p5", "p6", "p7", "p101", "p102", "p102", "p102", "p103", "p103", "p104", "p105", "p106", "p24", "p25", "p26", "p4"
If you press the key 4 at the time the cp chooses between the blow and to cover the blow, which I want is that if the blow comes to him three times then I could write another sequence
What I cannot do, is that the cp detects when 3 blows come to the opponent
#27
Posted 27 April 2004 - 02:10 AM
#28
Posted 27 April 2004 - 02:36 AM
#29
Posted 27 April 2004 - 06:41 AM
grats
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users