Acmlm's Board - I2 Archive - Game Creation Center - Game Maker scripts/tutorials
User | Post |
Cruel Justice
Posts: 1139/1384 |
Dragging all the icons in attempt to make a game doesn't give you that much power by itself. You need scripts to make your game professional. I have a few tips and scripts here and there and I'd like to share them. I'll add more as I come up with some good ones (works for GM6).
Very simple translucency code:
-Place an "Execute Piece of Code" into your object. -Put in: image_alpha = 0.5 --you may change the value to whatever you like to make it less or more translucent
Object identity and following script: -Place an "Execute Piece of Code" into your object. -Put in: { global.objectx = x; global.objecty = y; } --That identifies that object's current position, you may change the name but use the same global variable for the object that will follow your identified object. -Make another object (call it "object2") and place an "Execute Piece of Code" in the "Step" event. -Put in: { if (point_distance(x,y,global.objectx,global.objecty) > 500) { speed = 0; exit; } if (point_distance(x,y,global.objectx,global.objecty) < 500) move_towards_point(global.objectx,global.objecty,1); } --You may change the number 500 (the distance in pixels) and the speed.
|
|