| |
MechaSource - Beta SDK Discussion, Develop, share and play games
Mecha the Slag |
|

http://mechaware.net
![Super Happy Heart Badge [*]](https://archive.mfgg.net/html/badges/shappyheart.gif) ![Drawing Comp Winner Badge (1) [*]](https://archive.mfgg.net/html/badges/dcg1.gif) ![Drawing Comp Top 5 Badge (1) [*]](https://archive.mfgg.net/html/badges/dct1.gif) ![Minigame Comp Winner Badge (5+) [*]](https://archive.mfgg.net/html/badges/mcg5.gif) ![Minigame Comp Runner Up Badge (3) [*]](https://archive.mfgg.net/html/badges/mcr3.gif)
![Minigame Comp Third Place Badge (2) [*]](https://archive.mfgg.net/html/badges/mct2.gif) ![MFGG Awards 2008 Winner [*]](https://archive.mfgg.net/html/badges/award08.gif) ![Secret Santa Badge [*]](https://archive.mfgg.net/html/badges/present.gif)

Group: Members
Posts: 11816
Member No.: 728
Joined: 15-December 04
Status: (0d)
![[--]](style_images/mfgg2_skin/warn_nosuspend.gif)

|
HELLOLately I've been brewing a few examples. I will share them here, and beg that you understand just a bit of it...!! It won't get you full insight in the programming language, but it will help you understand some parts. Though I am most certain most of you won't get it anyway! It's always easier to understand something when you actually have it in your hand. I would post it in a code tag, or upload the file, but since none of these have proper formatting, I figured I would post an image instead. THIS FIRST EXAMPLE SHOWS HOW TO MAKE ECHOS ' If you understand this, ++ props to you!! I will look greatly forward to you programming in MechaSource  (ps. "sound.play(channel, path, repeat)" is predefined! Same for "sound.volume(channel, volume)" ...! ) This post has been edited by Mecha the Slag on Jul 7 2009, 01:35 PM
--------------------
|
|
|
Xgoff |
|

<):|
![Super Happy Heart Badge [*]](https://archive.mfgg.net/html/badges/shappyheart.gif) ![Sprite Comp Winner Badge (1) [*]](https://archive.mfgg.net/html/badges/scg1.gif) ![Drawing Comp Winner Badge (1) [*]](https://archive.mfgg.net/html/badges/dcg1.gif) ![Drawing Comp Runner Up Badge (1) [*]](https://archive.mfgg.net/html/badges/dcr1.gif) ![MFGG Awards 2006 Winner [*]](https://archive.mfgg.net/html/badges/award06.gif)
![MFGG Awards 2007 Winner [*]](https://archive.mfgg.net/html/badges/award07.gif) ![Forum Event Badge [*]](https://archive.mfgg.net/html/badges/event.gif)

Group: Members
Posts: 52341
Member No.: 24
Joined: 13-October 03
Status: (0d)
![[--]](style_images/mfgg2_skin/warn_nosuspend.gif)

|
also because i like doing this a lot:
your if delay == nil then delay = 40 end and if fade == nil then fade = 0.6 end can be rewritten as delay = delay or 40 and fade = fade or 0.6
--------------------
 DISCLAIMER: by sending me (xgoff) a private message, you agree to the directives and their terms specified henceforth: DIRECTIVE 1 (APPLE): i may or may not reply promptly or at all; and there are no guarantees to the usefulness of the reply. i may not acknowledge whether i have even received your private message DIRECTIVE 2 (CHILE CON CARNE): as per my view, "private" applies only to the initial transaction, and the material of your message may or may not be made public at my discretion; as this will more than likely be a post in the CCC or IRC, you may not be able to view it DIRECTIVE 3 (FEATHER DUSTER): you must address me (xgoff) as "Sir Master Xgofficus his Highest and Most Awesome the Third"; failure to comply with this term may invoke one or both of the above directives, and i will leave a burning bag of **** on your doorstep DIRECTIVE 4 (BOOTSTRAP): if you have read this disclaimer, please private message me promptly, in compliance with the above terms, so i can ensure you are capable of following directions you idiot this concludes the test of the emergency disclaimer system, your scheduled programming will now continue. satisfaction guaranteed, and 100% cash back available under certain circumstances; restrictions may or may not apply within your place of residence NOTICE: these directives and their terms may change at any time, without notice; as a private message transaction to myself assumes an understanding and full compliance of the above, you should ensure you are fully aware of the above terms at any point before sending a private message; any message received is assumed to have been sent in compliance with the above| QUOTE | (5:25:58 PM) Mikau: xgoff (5:26:00 PM) Mikau: guess what (5:26:04 PM) Xgoff: chicken butt (5:26:09 PM) Mikau: **** you |
|
|
|
Xgoff |
|

<):|
![Super Happy Heart Badge [*]](https://archive.mfgg.net/html/badges/shappyheart.gif) ![Sprite Comp Winner Badge (1) [*]](https://archive.mfgg.net/html/badges/scg1.gif) ![Drawing Comp Winner Badge (1) [*]](https://archive.mfgg.net/html/badges/dcg1.gif) ![Drawing Comp Runner Up Badge (1) [*]](https://archive.mfgg.net/html/badges/dcr1.gif) ![MFGG Awards 2006 Winner [*]](https://archive.mfgg.net/html/badges/award06.gif)
![MFGG Awards 2007 Winner [*]](https://archive.mfgg.net/html/badges/award07.gif) ![Forum Event Badge [*]](https://archive.mfgg.net/html/badges/event.gif)

Group: Members
Posts: 52341
Member No.: 24
Joined: 13-October 03
Status: (0d)
![[--]](style_images/mfgg2_skin/warn_nosuspend.gif)

|
| QUOTE (Mecha the Slag @ Jul 7 2009, 12:49 PM) | | thank you! I had no idea you could actually do that :grin: |
it's pretty nice when you have to do something like:
var = try_this or try_that or maybe_this or hopefully_this or 0
one you probably won't ever use but could still be handy is to use 'and' instead of 'or', which basically tests if a variable ISN'T false or nil
so something like: var = arg or 2 -- assigns 2 if 'arg' is false or nil, otherwise assigns 'arg' var = arg and 2 -- assigns 2 if 'arg' is NOT false or nil, otherwise assigns 'arg'
This post has been edited by Xgoff on Jul 7 2009, 02:13 PM
--------------------
 DISCLAIMER: by sending me (xgoff) a private message, you agree to the directives and their terms specified henceforth: DIRECTIVE 1 (APPLE): i may or may not reply promptly or at all; and there are no guarantees to the usefulness of the reply. i may not acknowledge whether i have even received your private message DIRECTIVE 2 (CHILE CON CARNE): as per my view, "private" applies only to the initial transaction, and the material of your message may or may not be made public at my discretion; as this will more than likely be a post in the CCC or IRC, you may not be able to view it DIRECTIVE 3 (FEATHER DUSTER): you must address me (xgoff) as "Sir Master Xgofficus his Highest and Most Awesome the Third"; failure to comply with this term may invoke one or both of the above directives, and i will leave a burning bag of **** on your doorstep DIRECTIVE 4 (BOOTSTRAP): if you have read this disclaimer, please private message me promptly, in compliance with the above terms, so i can ensure you are capable of following directions you idiot this concludes the test of the emergency disclaimer system, your scheduled programming will now continue. satisfaction guaranteed, and 100% cash back available under certain circumstances; restrictions may or may not apply within your place of residence NOTICE: these directives and their terms may change at any time, without notice; as a private message transaction to myself assumes an understanding and full compliance of the above, you should ensure you are fully aware of the above terms at any point before sending a private message; any message received is assumed to have been sent in compliance with the above| QUOTE | (5:25:58 PM) Mikau: xgoff (5:26:00 PM) Mikau: guess what (5:26:04 PM) Xgoff: chicken butt (5:26:09 PM) Mikau: **** you |
|
|
|
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
Track this topic
Receive email notification when a reply has been made to this topic and you are not active on the board.
Subscribe to this forum
Receive email notification when a new topic is posted in this forum and you are not active on the board.
Download / Print this Topic
Download this topic in different formats or view a printer friendly version.
[ Script Execution time: 0.1264 ] [ 13 queries used ] [ GZIP Enabled ] [ Server Load: 0.79 ]
| |