• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/43

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

43 Cards in this Set

  • Front
  • Back
get_string("Question","Input");

Allows users to define the text in a var or obj.

draw_text(x,y,variable or "text");

Draws the defined variable or "text" at x,y, coordinates.

room_goto(roomname)

Sends the user to specified room.

ObjName.var-=x;

Used when referencing another obj in a script.

if var == x


{


statement;


}

If statement. If var == x, then the statement will be completed.

&&

'And' expression. If var1==1 && var2==1 then the following code will be executed.

!

'Not' expression. If var1 != 0 then the following code will be executed. (If var1 does not equal 0)


var[1] = 2


var[2] = 4

1D array. Useful for setting up an inventory, intro, etc.


var[1,2]="text"


var[1,2]=4

2D array. Useful for adding multiple vars to an obj.

random()


function. Gets any number within its range.


if var(random(100)) = 0


{


do this


}

round()


function. Use with random() to get a whole number


round(random(12,24,38,50,62))

-- Check to see If player's health is 0. If so, then show message "You have died."


if player.health = 0


{


show_message("You have died.")


}

instance_create(x,y,obj)

Function. Create a random instance of an obj @ x,y.

Function. Without specification, destroys the instance's self.

instance_destroy()

instance_nearest(x,y,obj)

Function. Finds the nearest instance of an object within x,y.

instance_furthest(x,y,obj)

Function. Finds the nearest instance of an object within x,y.

Function. Move towards a certain x,y point at a designated speed.

move_towards_point(x,y,speed)

Function. Restart the game.

game_restart()

Function. Goto a specific room.

goto_room(room)

Vspeed = 0

Set the Vertical Speed to 0

place_meeting(x,y,obj)


Checks for a collision at x,y with obj.


Use with If to check for a collision.


if place_meeting(x,y+1,obj_ground) && vspeed>=0


{


vspeed=-6


}

--Check for a collision with obj_test at 6 steps to the right. If true, set vertical speed to -10.


(Use this with a keyboard press.)


if place_meeting(x+6,y,obj_test)


{


vspeed=-10


}

--Check if the player is free from contact at y+1. If so, set gravity to 0.5.


if(place_free(x,y+1))


{


gravity=0.5


}

--Move the player to contact with solid obj in 270 direction (down) at max of 12.


move_contact_solid(270,12)


Direction - 0 degrees


270 degress

0 - Right


270 - Down

Draw_sprite(sprite,subimage,x,y)

Draws the specified sprite and subimage @ x,y.

Draw_Sprite_Tiled(sprite,subimage,x,y)

Draw tiled sprite and subimage @ x,y

Draw a background @ x,y.

draw_background(background,x,y)

Used to obtain a random value between two provided values & put into a variable.

var = random(1,10)

Execute scripts (2 ways)

Directly: script_name(arg,obj_player,0.12,false) -- works like a function.


Script Execute: script_execute(script_name,arg,obj_player,0.12,falst)

Arguments

From Arg0 to a max of 16 Args, accessed within the scripts using keyword "argument0"

Expression to combine two strings.

Plus sign +.


string = "x" + "y";

Not equal to

Expression !=

OR. Will return true if atleast one of the Booleans are true.

|| or

XOR. Will return true if one of the Booleans is true and the other is false.

^^ xor

Inefficient method for checking multiple conditions.


if(color == blue || color == green || color == red)


{


temperature = "cold";


}


else if(color == red || color = orange || color = yellow)


{


temperature = "x";


}


etc... Use a switch statement instead.

Switch

Statement. Used with keywords "switch","case","break" and "default."


switch (color)


{


case red:


case orange:


case yellow:


temperature = "warm";


break;


case green:


case blue:


case purple:


temperature = "cool";


break;


default:


temperature = "other";


break;


}

Difference between Loop and Repeat

Loop is used to execute a program multiple times.


Repeat is used to execute a program for a specified number of times.

Repeat 10 times


repeat (10)


{


instance_create(random(100),random(100),obj_x)


}

While


used to execute a program until the condition is no longer met.


while ( x > 100)


{


x -= 10;


}

Do statement

Like 'While' statements, except they use the keyword ''Until." Will be executed first, then checked.


do


{


x-=10


}


until (x <= 100);

For

var I;


for (I=0 ; I < 10; I++)


{


instance_create(I*100 + 25, 25, obj_button)


}


I=0 sets the local variable to 0.


I<10, checks if I is less than ten.


If so, then increment I.

a

a