commands U.I friendly
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
commands U.I friendly
hello, are there in livecode any other commands such as drag that are more used in nowadays games?
thanks!
thanks!
Samuele.
-
- Livecode Opensource Backer
- Posts: 10094
- Joined: Fri Feb 19, 2010 10:17 am
Re: commands U.I friendly
Can you list the sort of commands you are thinking of?
Re: commands U.I friendly
Create a button and put the script on it
The result will be a draggable button. Is that what you are looking for?
Code: Select all
on mouseDown pButtonNumber
grab me
end mouseDown
Be kind, we all have our own wars.
https://torocruzand.com/
https://torocruzand.com/
-
- Livecode Opensource Backer
- Posts: 10094
- Joined: Fri Feb 19, 2010 10:17 am
Re: commands U.I friendly
I would understand "other commands" (plural) to mean more than that.
However, the OP is given to such terseness that sometimes their questions are obscure.
I have requested amplification.
Whether this terseness is due to poor English, or just a heckling way of of demanding things, I'm not exactly sure. But the effect is the latter.
However, the OP is given to such terseness that sometimes their questions are obscure.
I have requested amplification.
Whether this terseness is due to poor English, or just a heckling way of of demanding things, I'm not exactly sure. But the effect is the latter.
-
- VIP Livecode Opensource Backer
- Posts: 10044
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: commands U.I friendly
Samuele has 78 posts here, most quite obviously in earnest. I'd give a little time before casting judgment on this one.
It's actually a good question: the drag command is a holdover from HC, yet we have little in the engine to handle modern animation effects like multicell sprites, or even threaded animated GIFs.
It's actually a good question: the drag command is a holdover from HC, yet we have little in the engine to handle modern animation effects like multicell sprites, or even threaded animated GIFs.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- Livecode Opensource Backer
- Posts: 10094
- Joined: Fri Feb 19, 2010 10:17 am
Re: commands U.I friendly
I am 100% sure Samuele is in earnest.
I was commenting on the terseness of his postings, and not his obvious wish to learn.
I was commenting on the terseness of his postings, and not his obvious wish to learn.
-
- VIP Livecode Opensource Backer
- Posts: 10044
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: commands U.I friendly
Maybe he's seen enough of my posts to see how things that are too long to read don't get read, so he's erring the other direction.richmond62 wrote: ↑Fri Jan 14, 2022 11:55 pmI am 100% sure Samuele is in earnest.
I was commenting on the terseness of his postings, and not his obvious wish to learn.

Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: commands U.I friendly
He's learning LC and making progress. The problem with learning a new programming language is that you don't have the vocabulary to explain what you're looking for. This is compounded by the fact that English may not be his first language. I don't hold any of that against him.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- Livecode Opensource Backer
- Posts: 10094
- Joined: Fri Feb 19, 2010 10:17 am
Re: commands U.I friendly
Nor do I.
HOWEVER, it would be easier to help him if he were more verbose, even if he used what we might
term everyday terms, or even supplied some diagrams.
HOWEVER, it would be easier to help him if he were more verbose, even if he used what we might
term everyday terms, or even supplied some diagrams.
Re: commands U.I friendly

but that's just one of... my question is are they any other commands like that (you may see them in other apps/games) or as FourthWorld said
or better for exaple the "movements" you can see on this picture you may want to use one for exaple if you want to 'kick' a ball in a game ecc.
So, sorry for my english and thanks for the support.
Samuele.
Samuele.
-
- Livecode Opensource Backer
- Posts: 10094
- Joined: Fri Feb 19, 2010 10:17 am
Re: commands U.I friendly
https://www.dropbox.com/s/1xrvr2gaui9a5 ... e.zip?dl=0
-
Code in the football:
Code: Select all
on mouseDown
grab me
end mouseDown
on mouseUp
if intersect(image "ball", image "goal") then
set the vis of image "smile" to true
set the loc of img "ball" to 480, 300
wait 4 secs
set the vis of image "smile" to false
else
-- do nothing
end if
end mouseUp

-
- Livecode Opensource Backer
- Posts: 10094
- Joined: Fri Feb 19, 2010 10:17 am
Re: commands U.I friendly
The drag command is the easiest way to do it but you could also use a mouseMove handler to track the mouse and set the location of the object to the mouseloc. This does the same thing but requires more code and needs additional code to exit the drag. It isn't the best way to do it.
What effect do you want besides just moving the control? If you want shadows or other visual changes you can script those before the drag begins.
What effect do you want besides just moving the control? If you want shadows or other visual changes you can script those before the drag begins.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: commands U.I friendly
by the way, I'm looking for mobile.
for example this: or this: don't know ho to say it, maybe a sort of swipe (for example in a soccer mobile game, you wuold kick the ball by swiping it forward or the way you want it to go).
Samuele.
-
- Livecode Opensource Backer
- Posts: 10094
- Joined: Fri Feb 19, 2010 10:17 am
Re: commands U.I friendly
-
- Attachments
-
- CLICKER.livecode.zip
- Stack.
- (10.62 KiB) Downloaded 523 times