Coding - Ain't it a Beach
|
Coding - Ain't it a Bitch!
Simple but easy ways to help you out when coding:
This Article is based around Coding Simplifying/Problems/Tips
Simplifying a Code:
1. Say if I want to make a Music player and I make 4 buttons (stop, play, rew, ff)
Then I go to the Event Editor to give them actions but all I see is:
Button, Button 1, Button 2, Button 3. Now how do i know which buttons which??? Well damn if
I know!!! But this is usually what the un-organized do e.g ME
When you create A Object always give the Object a Name this will save you time and stress
when Coding.
2. Also it is good to put Comments and such to group your codes just like you would do an
Example of something and give it to someone. r you could have something like a colour key
e.g RED = Players so it will be alot easier for you to find what you are looking for.
Fixing Problems:
(Getting/Retrieving strings and Values)
Usually when you make a code you haven’t tried before your going to have some difficulties. to find out the Problems/Action of the code your going to bring out my little friend The "Edit" Object. Now all the Precious code you typed in copy it and do a Condition:
Always - set text to -Copy Code Here-
Now run your Application and it will show the code! From here you should be able to see your Problem and then it’s just a matter of fixing it up!
(Note: if you need to show alot of code's do the above trick, also delete the Edit Objects after Perfecting the Code to save space.)
Getting Values with Text:
So you wanna set a Text/Edit Object to a value?? but you keep getting this error:
"Enter a Alphanumeric Expression"?? this is an easy fix. Click on Retrieve Data From Object-->Special Condition-->Conversions-->Convert Value to String then just enter the value you want, you can also Convert String to Value.
Adding Text/Code to Text:
Okay so you want to do something like this:
Start Of Frame - Set Text to "save"
And add the value of the counter on the end of it e.g save12
But it wont let you well this is another simple fix add a + sign between the codes this tells it to add it on e.g
Start Of Frame - Set Text To "save" + value of(counter)
This doesn’t just work in text it works in all areas of Coding.
this isnt to great but it just gives you some tips when coding..
|
|
|