How do i Run 2 or more events at the same time?

Creating Games? Developing something for fun?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Jarf01
Posts: 12
Joined: Wed Mar 02, 2016 1:23 am

Re: How do i Run 2 or more events at the same time?

Post by Jarf01 » Fri Mar 04, 2016 9:34 pm

So well On the bottom , i can say it is "Well" because the two statements go under a condition , Then it should be at the Fireable var. IT could bebecause they aren under a condition , As far as i know livecode is alane executing progra so it goes line by line, so this make an No-End repeat just with the send Command. So, i should change the location of Exit Fire(or delete it) and i need to change the location of "Put fale into fireable". another logical anwser or idea i can have is changing the milliseconds time to give a good time to check The statment. Well, ill try both cases then. Thanks for the hint, itsvery clear rigth now , well Then tried the time now, (doing this at the same time im writting ) To dont make a topic full of replys , the time Did not work , so its going to reduce to the PutFalse Location , as i saw or the True location can be an option too, so i cant put it out of the if so i need to put that sentence in the if or under it , I cant put it above the Send message so it need to be under it , so well im trying and trying dont get the correct location of False But if it is not the Put Fals into Variable , If it is the true? So Yeah actually i dont see the Exact way of Fireable is always True, I think on the if or the put location or the send message althoug but i surely know that is not the move and the show/hide Commands , i not used To Send commands and this is my first time working with True and false at this level, Should be notorious that im not an american - english person, And Yeah i literally dont know anything about Real programing, in my class (Second year - High school) We just only use Interger and real we saw if and Case of In pascal but nothing like set or arrays. Livecode Set and Pascal Set are totally difirent Afaik, So well Thanks for your hint , and i will try by numbers, Have nice Day / nigth . If you want say How its by the true and Flase way it will help much for future development , and one last question for the numericway if i do:

Code: Select all

Local NFF
#NumberForFire
On keyDown Pletter
If pletter is Space then
Add 1 to NFF
if Nff = 1 Then
Do hide
Do show
Do setLoc
Do move 
Do send
Substract 1 to Nff
End if
#Do - command is just an example
i think that is not the way because is the same as i used in True/False Sentences ; So yeah i figured were was the rror But did not figuret that Fireable was always being true. (at some point i Tought Fireable Was not setting to false Value so, Well i conclude it was the True or False Sentence were the error is , Ifyou can clarify me on the true and False way Thanks, For being Tolerant , Responsible and patient with me, Thanks for all the help Gived :)

Newbie4
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 327
Joined: Sun Apr 15, 2012 1:17 am
Location: USA
Contact:

Re: How do i Run 2 or more events at the same time?

Post by Newbie4 » Fri Mar 04, 2016 10:46 pm

You seem to be just making changes here and there, trying to get it to work. That will never get you finished. It is just making your code more fragmented and hard to read.

It appears that you are not clear what to do or how to do it. I recommend that you step a away from the code and work on the logic and the flow of the program. Maybe explain it to another person, how it will work.
It helps to talk out loud. Explain it to your dog if you have to. Once you are clear on exactly what you want to happen and how it will work, you can start coding. For instance, you need to answer some important questions.

When do you fire the dart? Where does it get fired from? or who fires it?
What happens when it hits the spaceship? What happens if it misses it? Does it disappear? Does it go off the screen? Does it reappear on the other side or do you have to shoot it again? Can you fire more than 1 dart at a time? or do you have to wait for the one dart to go off the screen before shooting another dart?

Once you have the logic and sequence down,, we can decide the best place to put the code. Everything does not just happen, it all has to be planned out,

If you are having trouble with the language, you need to take a break and learn it some more. You can't build anything without knowing how to use the tools. You will just get frustrated and mad.

You are welcome to look here https://sites.google.com/a/pgcps.org/livecode/ for a simple use of the commands (especially the If statement here https://sites.google.com/a/pgcps.org/li ... ng-choices ).

You may have a deadline for this code and not think that you have the time but you are not making much progress this way - sending messages/pieces of code and waiting for someone to answer you.

It will get easier and you are doing good for a raw beginner. Just take your time to learn the language and understand what you are doing.

Does that make sense?
Cyril Pruszko
https://sites.google.com/a/pgcps.org/livecode/
https://sites.google.com/a/setonhs.org/app-and-game-workshop/home
https://learntolivecode.com/

Jarf01
Posts: 12
Joined: Wed Mar 02, 2016 1:23 am

Re: How do i Run 2 or more events at the same time?

Post by Jarf01 » Fri Mar 04, 2016 11:02 pm

So well, That was all i needed! Those questions , and absolutley your help, So Thanks again , i will Put the code when i understand good the tools im using now, And another things. Thanks a lot for your help and Yes it makes sense :)

Post Reply

Return to “Games”