Jump to content


Respects

Member Since 27 Jun 2008
Offline Last Active Dec 12 2008 08:57 PM

Topics I've Started

2 Questions

03 October 2008 - 07:27 PM

1. Whats the code to MUTE all sounds ?
2.Whats the code for changing between Full and Window screen ?

Change Backround

03 October 2008 - 10:29 AM

that is set on my "Z" press event
background_assign(0,ba_evil)
and it doesnt change
whats wrong ?

Object Following

01 October 2008 - 02:33 PM

So my room view folows an object,and in the game i have a instance change, when i change the instance in the game view stops following me,so how can i make it follow my both objects? i thought of changeing the following object when i press the "transformation" button,but i dont know the code...

Rolling Ball

01 October 2008 - 12:24 PM

how to make a ball that will ROLL when vk_right is pressed. -_- ?

Wtf !?

01 October 2008 - 11:43 AM

so i added lifes to my game and when i start it it freezes... heres the code of the object: Information about object: obj_kitty

Sprite: spr_charstandR
Solid: false
Visible: true
Depth: -10
Persistent: false
Parent: <no parent>
Mask: mask

Create Event:
execute code:

double_jump=1
set variable can_shoot to 1
set the number of lives to 3

Alarm Event for alarm 0:
set time line timeline2 at position 0

Step Event:
execute code:

//animation speed
image_speed=0.3
//gravity
if place_free(x,y+1) {gravity = 0.5}
else {gravity = 0}
gravity_direction = 270
//vspeed limiter
if vspeed > 10 {vspeed = 10}
//move
if keyboard_check (vk_right) && place_free(x+4,y) {x+=4
sprite_index=spr_charR}


if keyboard_check (vk_left) && place_free(x-4,y) {x-=4
sprite_index=spr_charL}

//jump
if keyboard_check (vk_up) && !place_free(x,y+1) {vspeed = -7
double_jump = 1}


If lives are smaller than 1
      display message: you are dead !
restart the game

Collision Event with object obj_wall:
execute code:

double_jump=1

if vspeed > 0 && !place_free(x,y+vspeed) {move_contact(270)}
vspeed = 0



Collision Event with object obj_monster:
execute code:


if vspeed > 0 && !place_free(x,y+vspeed) {move_contact(270)}
vspeed = 0


set the number of lives to -1

Collision Event with object obj_monster2:
set the number of lives to -1

Draw Event:
execute code:

draw_sprite(sprite_index,-1,x,y)
draw the lives at (0,0) with sprite sprite17

Key Press Event for <Space> Key:
if can_shoot is equal to 1
      play sound sound0; looping: false
      execute code:


if sprite_index=spr_charR or sprite_index=spr_charstandR
{bulletright=instance_create(x,y,obj_bulletR);
with (bulletright) motion_set(360,12);}

if sprite_index=spr_charL or sprite_index=spr_charstandL
{bulletleft=instance_create(x,y,obj_bulletL);
with (bulletleft) motion_set(180,12);}
      set variable can_shoot to 0
      set Alarm 0 to 10

Key Press Event for <Up> Key:
execute code:


//First part checks if you can activate the jump. The second part executes the jump
//and resets so you can't jump again.

if double_jump = 0 then exit;

else

vspeed = -9
double_jump = 0

Key Release Event for <Left> Key:
execute code:

sprite_index=spr_charstandL

Key Release Event for <Right> Key:
execute code:

sprite_index=spr_charstandR