Powered by Invision Power Board

 
  Pages: (2) [1] 2  ( Go to first unread post ) Reply to this topicStart new topicStart Poll

> Mega's random Game Maker tips
Canada
MegaTailzChao
Posted: Jun 18 2008, 12:21 PM
Quote Post


So long, and thanks for all the fish.
[S][*][*][*][*]
[*][*]

Group Icon
Group: Site Staff
Posts: 15788
Member No.: 2267
Joined: 2-July 06

Status: (0d) [--]


1. You know how when you set alarms, you can set a different one by putting "alarm[alarmnumber]"? Well you can do that with any variable. For example, for prices on items in stores, you could use price[12], for getting the price of item number 12. Even better is that what goes into the square brackets is not limited to a number. So you could go varialbe1[varialbe2[varialbe3]], and so on if you wish. Really it's only that useful for thing such as inventories, but it could still save your life. You never know.

As I feel like it I will add more, feel free to ask questions if you don't understand any.


--------------------
user posted image
user posted imageuser posted image
PMEmail PosterMSN
Top
United States
Bacteriophage
Posted: Jun 18 2008, 12:23 PM
Quote Post


injustice anywhere is a threat to justice everywhere
[*][*][*][*][*]
[*][*][*][*][*]
[*][*][KFC]

Group Icon
Group: Members
Posts: 10716
Member No.: 2411
Joined: 31-July 06

Status: (0d) [--]


Hey can I do one


--------------------
PMEmail PosterUsers WebsiteAOLMSN
Top
Canada
MegaTailzChao
Posted: Jun 18 2008, 12:25 PM
Quote Post


So long, and thanks for all the fish.
[S][*][*][*][*]
[*][*]

Group Icon
Group: Site Staff
Posts: 15788
Member No.: 2267
Joined: 2-July 06

Status: (0d) [--]


QUOTE (MetalMan @ Jun 18 2008, 11:23 AM)
Hey can I do one

Yeah sure go ahead


--------------------
user posted image
user posted imageuser posted image
PMEmail PosterMSN
Top
United States
Xgoff
Posted: Jun 18 2008, 12:35 PM
Quote Post


<):|
[*][*][*][*][*]
[*][*]

Group Icon
Group: Members
Posts: 52341
Member No.: 24
Joined: 13-October 03

Status: (0d) [--]


yes, those are arrays/tables and that's how they work

EDIT: and you didn't mention how to access multidimensional arrays like BLAH[x][y][z][w]

This post has been edited by Xgoff on Jun 18 2008, 12:36 PM


--------------------

This post may contain original research or unverified claims.
Please disregard the above information and contact an administrator.

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
PMEmail PosterUsers WebsiteAOLMSN
Top
United States
Bacteriophage
Posted: Jun 18 2008, 01:27 PM
Quote Post


injustice anywhere is a threat to justice everywhere
[*][*][*][*][*]
[*][*][*][*][*]
[*][*][KFC]

Group Icon
Group: Members
Posts: 10716
Member No.: 2411
Joined: 31-July 06

Status: (0d) [--]


2. Have you ever noticed that occasionally, sprites will have a graphical glitch? This actually occurs when a sprite is drawn at a non-whole number, causing some pixels to be drawn wrong. This can be fixed by putting the following code in the Draw event (sorry, this won't work in non-registered/lite GM!)

draw_sprite_ext(sprite_index,image_index,floor(x),floor(y),image_xscale,image_ys
cale,image_angle,-1,image_alpha);


--------------------
PMEmail PosterUsers WebsiteAOLMSN
Top
Canada
MegaTailzChao
Posted: Jun 18 2008, 02:25 PM
Quote Post


So long, and thanks for all the fish.
[S][*][*][*][*]
[*][*]

Group Icon
Group: Site Staff
Posts: 15788
Member No.: 2267
Joined: 2-July 06

Status: (0d) [--]


QUOTE (Xgoff @ Jun 18 2008, 11:35 AM)
yes, those are arrays/tables and that's how they work

EDIT: and you didn't mention how to access multidimensional arrays like BLAH[x][y][z][w]

Wait you can do that???


--------------------
user posted image
user posted imageuser posted image
PMEmail PosterMSN
Top
Austria
Guinea
Posted: Jun 18 2008, 02:40 PM
Quote Post


6
[A][*][*][*][*]
[*][*][*][*][*]
[*]

Group Icon
Group: Admins
Posts: 8600
Member No.: 893
Joined: 15-March 05

Status: (0d) [--]


QUOTE (MegaTailzChao @ Jun 18 2008, 08:25 PM)
Wait you can do that???

GM only supports 2D Arrays and they go like variable[x,y].

And they're not only useful for inventories, MTC.
PMEmail PosterAOLMSN
Top
United States
Mechant
Posted: Jun 18 2008, 02:41 PM
Quote Post



[*][*][*][*][*]
[*][*]

Group Icon
Group: Members
Posts: 12675
Member No.: 1349
Joined: 16-August 05

Status: (0d) [--]


ah yes
Would Alarm[1][2][3]... work?
Setting the value of steps in multiple Alarms at once?
Or can you only
Alarm[1]= hi
Alarm[2]= yeah
Alarm[3]= yo mama

etc


--------------------
user posted image

referencia nuevia (gracias MarioMK1)
PMEmail PosterAOLMSN
Top
Austria
Guinea
Posted: Jun 18 2008, 02:42 PM
Quote Post


6
[A][*][*][*][*]
[*][*][*][*][*]
[*]

Group Icon
Group: Admins
Posts: 8600
Member No.: 893
Joined: 15-March 05

Status: (0d) [--]


QUOTE (Cotangent Chaos @ Jun 18 2008, 08:41 PM)
ah yes
Would Alarm[1][2][3]... work?
Setting the value of steps in multiple Alarms at once?
Or can you only
Alarm[1]= hi
Alarm[2]= yeah
Alarm[3]= yo mama

etc

I think it only works like the latter method.
PMEmail PosterAOLMSN
Top
United States
Mechant
Posted: Jun 18 2008, 02:43 PM
Quote Post



[*][*][*][*][*]
[*][*]

Group Icon
Group: Members
Posts: 12675
Member No.: 1349
Joined: 16-August 05

Status: (0d) [--]


QUOTE (Guinea @ Jun 18 2008, 02:42 PM)
I think it only works like the latter method.

The former would save ALOT of time, though.


--------------------
user posted image

referencia nuevia (gracias MarioMK1)
PMEmail PosterAOLMSN
Top
United States
Elyk
Posted: Jun 18 2008, 02:45 PM
Quote Post


Standard Member
[*][*][*][*]

Group Icon
Group: Members
Posts: 6604
Member No.: 3808
Joined: 22-May 07

Status: (0d) [--]


QUOTE (Cotangent Chaos @ Jun 18 2008, 03:43 PM)
The former would save ALOT of time, though.

not really because you would be setting all the alarms to go off at the same time


--------------------
user posted image
PMEmail PosterUsers WebsiteAOLMSN
Top
United States
Mechant
Posted: Jun 18 2008, 02:47 PM
Quote Post



[*][*][*][*][*]
[*][*]

Group Icon
Group: Members
Posts: 12675
Member No.: 1349
Joined: 16-August 05

Status: (0d) [--]


QUOTE (Elyk @ Jun 18 2008, 02:45 PM)
not really because you would be setting all the alarms to go off at the same time

I know

Maybe alarm[0, 1, 2]?
It works in Python :V


--------------------
user posted image

referencia nuevia (gracias MarioMK1)
PMEmail PosterAOLMSN
Top
United States
Elyk
Posted: Jun 18 2008, 02:49 PM
Quote Post


Standard Member
[*][*][*][*]

Group Icon
Group: Members
Posts: 6604
Member No.: 3808
Joined: 22-May 07

Status: (0d) [--]


QUOTE (Cotangent Chaos @ Jun 18 2008, 03:47 PM)
I know

Maybe alarm[0, 1, 2]?
It works in Python :V

but why would you want to set them all to the same time?


--------------------
user posted image
PMEmail PosterUsers WebsiteAOLMSN
Top
Austria
Guinea
Posted: Jun 18 2008, 02:50 PM
Quote Post


6
[A][*][*][*][*]
[*][*][*][*][*]
[*]

Group Icon
Group: Admins
Posts: 8600
Member No.: 893
Joined: 15-March 05

Status: (0d) [--]


QUOTE (Elyk @ Jun 18 2008, 08:49 PM)
but why would you want to set them all to the same time?

Yea. You could instead just put one alarm...
PMEmail PosterAOLMSN
Top
United States
Mechant
Posted: Jun 18 2008, 02:51 PM
Quote Post



[*][*][*][*][*]
[*][*]

Group Icon
Group: Members
Posts: 12675
Member No.: 1349
Joined: 16-August 05

Status: (0d) [--]


QUOTE (Elyk @ Jun 18 2008, 02:49 PM)
but why would you want to set them all to the same time?

If you want everything to move in a certain direction at the same time.
(Example)


--------------------
user posted image

referencia nuevia (gracias MarioMK1)
PMEmail PosterAOLMSN
Top
Austria
Guinea
Posted: Jun 18 2008, 02:55 PM
Quote Post


6
[A][*][*][*][*]
[*][*][*][*][*]
[*]

Group Icon
Group: Admins
Posts: 8600
Member No.: 893
Joined: 15-March 05

Status: (0d) [--]


QUOTE (Cotangent Chaos @ Jun 18 2008, 08:51 PM)
If you want everything to move in a certain direction at the same time.
(Example)

with (all) { move in a direction }
PMEmail PosterAOLMSN
Top
United States
Mechant
Posted: Jun 18 2008, 02:58 PM
Quote Post



[*][*][*][*][*]
[*][*]

Group Icon
Group: Members
Posts: 12675
Member No.: 1349
Joined: 16-August 05

Status: (0d) [--]


QUOTE (Guinea @ Jun 18 2008, 02:55 PM)
with (all) { move in a direction }

Or a certain number of


--------------------
user posted image

referencia nuevia (gracias MarioMK1)
PMEmail PosterAOLMSN
Top
Canada
MegaTailzChao
Posted: Jun 18 2008, 02:58 PM
Quote Post


So long, and thanks for all the fish.
[S][*][*][*][*]
[*][*]

Group Icon
Group: Site Staff
Posts: 15788
Member No.: 2267
Joined: 2-July 06

Status: (0d) [--]


QUOTE (Guinea @ Jun 18 2008, 01:40 PM)
And they're not only useful for inventories, MTC.

It's all I could think of. sad.gif


--------------------
user posted image
user posted imageuser posted image
PMEmail PosterMSN
Top
Canada
MegaTailzChao
Posted: Jun 18 2008, 03:00 PM
Quote Post


So long, and thanks for all the fish.
[S][*][*][*][*]
[*][*]

Group Icon
Group: Site Staff
Posts: 15788
Member No.: 2267
Joined: 2-July 06

Status: (0d) [--]


3. Drawing a HUD. You my think "lol set the hud's x to xview and it works", but that makes it drag along. What you want to DRAW it at the xview instead, using draw_sprite.


--------------------
user posted image
user posted imageuser posted image
PMEmail PosterMSN
Top
United States
Bacteriophage
Posted: Jun 18 2008, 03:03 PM
Quote Post


injustice anywhere is a threat to justice everywhere
[*][*][*][*][*]
[*][*][*][*][*]
[*][*][KFC]

Group Icon
Group: Members
Posts: 10716
Member No.: 2411
Joined: 31-July 06

Status: (0d) [--]


QUOTE (MegaTailzChao @ Jun 18 2008, 01:00 PM)
3. Drawing a HUD. You my think "lol set the hud's x to xview and it works", but that makes it drag along. What you want to DRAW it at the xview instead, using draw_sprite.

3A. You can also set x to xview at the end step event.


--------------------
PMEmail PosterUsers WebsiteAOLMSN
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

  Topic Options Topic Options Pages: (2) [1] 2  Reply to this topicStart new topicStart Poll

 




[ Script Execution time: 0.0706 ]   [ 14 queries used ]   [ GZIP Enabled ]   [ Server Load: 0.64 ]