Hello, thanks for visiting GameML, if you are a Game Maker user, this is the site for you, please sign up, or login if you are already a member, or just browse the site! Welcome to GameML!

ATTENTION MEMBERS!!! USERS CAN NOW SIGN UP AGAIN!

Join the forum, it's quick and easy

Hello, thanks for visiting GameML, if you are a Game Maker user, this is the site for you, please sign up, or login if you are already a member, or just browse the site! Welcome to GameML!

ATTENTION MEMBERS!!! USERS CAN NOW SIGN UP AGAIN!
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Log in

I forgot my password

Search
 
 

Display results as :
 


Rechercher Advanced Search

Site Hits
Free hit counter
These stats started at 0 on July 7th 2009
GameML File Sharing
USERNAME: gamemladmin@gmail.com PASSWORD: gamemlsite Upload Here: https://gameml.forumotion.com/GameML-File-Sharing-h3.htmPlease add only games.
Create A GAMEML BLOG!
Make a Blog on GameML:http://gamemlblogs.wetpaint.com

Simple Codes by 3d

4 posters

Go down

Simple Codes by 3d Empty Simple Codes by 3d

Post by 3d Sun May 31, 2009 4:34 pm

Here are codes that people need alot, that i made and codes I've found. If you have a code you want to submit, post it in a comment and i will add it, pm me, or email me.

Look at mouse

image_angle=point_direction(x,y,mouse_x,mouse_y)

Create an object where your object is standing.

instance_create(0,0,obj_object)

opens up/closes 3d mode

d3d_start()
d3d_end()

how to do the relative selection in code.

speed+=1
vspeed+=1
hspeed+=1

destroy

instance_destroy()

how to code with a keypress that is a letter

if key_press(ord_"W"))

How to do passwords

password = get_string("Please enter a password"", "" );

switch(password)
{
case "password 1" :
room_goto(rm_level_1);
break;
case "password 2":
room_goto(rm_level 2);
break;
default :
show_message("Password Invalid");
break;
}


(from gamemaker.wikicomplete.info)

go to next room

room_go_to_next()
3d
3d
Admin
Admin

Posts : 1227
Points : 66276
GameML Reputation : 66
Join date : 2009-05-31
Age : 41
Location : U.S.A

https://gameml.forumotion.com

Back to top Go down

Simple Codes by 3d Empty Re: Simple Codes by 3d

Post by -js1210- Thu Jun 04, 2009 7:05 pm

This is for MAJOR n00bs. Except for the last few.
-js1210-
-js1210-
Super 500 GML
Super 500 GML

Posts : 1298
Points : 56642
GameML Reputation : 27
Join date : 2009-06-02
Age : 29
Location : United States

http://www.yoyogames.com/members/js1210

Back to top Go down

Simple Codes by 3d Empty Re: Simple Codes by 3d

Post by 3d Fri Jun 05, 2009 8:38 am

yeah. or ppl thats are AMAZING, but use D&D only.
3d
3d
Admin
Admin

Posts : 1227
Points : 66276
GameML Reputation : 66
Join date : 2009-05-31
Age : 41
Location : U.S.A

https://gameml.forumotion.com

Back to top Go down

Simple Codes by 3d Empty Re: Simple Codes by 3d

Post by Time Sun Jun 07, 2009 8:42 am

Easy value swapping (true becomes false, false becomes true):
Code:
boolean = !boolean
Easy gravity:
Code:
gravity = place_free(x, y+1);
Easy auto-tiling:
Code:
grid_x = argument0;
grid_y = argument1;
obj = argument2;
image_index = 1 * place_meeting(x, y + grid_y, obj) +
              2 * place_meeting(x, y - grid_y, obj) +
              4 * place_meeting(x + grid_x, y, obj) +
              8 * place_meeting(x - grid_x, y, obj);
...Used with a tileset like this: Simple Codes by 3d NormalTiles
Drawing a default sprite (pro)
Code:
draw_sprite_ext(sprite_index,image_index,x,y,image_xscale,image_yscale,image_angle,image_blend,image_alpha);
Drawing a default sprite (lite)
Code:
draw_sprite(sprite_index, image_index, x, y);
Text alignment (centered)
Code:
draw_set_valign(fa_center);
draw_set_halign(fa_center);
Time
Time
GameML Noob
GameML Noob

Posts : 22
Points : 54601
GameML Reputation : 3
Join date : 2009-06-01
Age : 31

Back to top Go down

Simple Codes by 3d Empty Re: Simple Codes by 3d

Post by 3d Sun Jun 07, 2009 8:53 am

correct.
3d
3d
Admin
Admin

Posts : 1227
Points : 66276
GameML Reputation : 66
Join date : 2009-05-31
Age : 41
Location : U.S.A

https://gameml.forumotion.com

Back to top Go down

Simple Codes by 3d Empty Re: Simple Codes by 3d

Post by Desert Dog Fri Jun 12, 2009 11:41 pm

3d, your code's have several errors in them. Hardly helpful to beginners, e.g.

it is room_goto_next() NOT room_go_to_next();

And it is NOT if key_press(ord_"W")), it is
if keyboard_check(ord('W')), there is not function called key_press.

And as for this

Create an object where your object is standing.

instance_create(0,0,obj_object)
This will only create an object in the top left hand corner of the room, try it.
If you want to create an object where you stand, do this.
Code:

instance_create(x,y,obj_object);

I hope this clears this up for you, we don't want to mis-inform/confuse beginners!
Desert Dog
Desert Dog
GameML Noob
GameML Noob

Posts : 5
Points : 54452
GameML Reputation : 1
Join date : 2009-06-12

Back to top Go down

Simple Codes by 3d Empty Re: Simple Codes by 3d

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum