Page 1 of 7

Voidy - New GM Game whose first demo will be out soon-ish!

Posted: Tue Nov 22, 2011 6:47 am
by StinkerSquad01
haha new post

UPDATE LOG (now you know what I am actually doing!)

3/5/12
•Created update log
•Created W1 Boss
•Started work on a few cutscenes
3/10/12
•Created level entrances (warp cubes)
•Other level entrance related things

Posted: Tue Nov 22, 2011 7:07 am
by StinkerSquad01
Ok, I need help trying to get little black balls move around my character (Voidy) and follow him.

Posted: Tue Nov 22, 2011 2:14 pm
by Blast!10
In Step event of the little black ball:

gravity = 0.2;
gravity_direction = point_direction(x,y,?.x,?.y);

Replace ? with the name of the object representing Voidy.

You might want to try playing with the gravity value, or perhaps add some friction.

Posted: Tue Nov 22, 2011 6:22 pm
by StinkerSquad01
Thanks Blast‼ I assume I put that into an "Execute Code" action then.
EDIT: WOW, this rocks! I'll experiment with gravity and friction, thanks!

Posted: Tue Nov 22, 2011 7:02 pm
by StinkerSquad01
New task, getting the orbs to spawn randomly along the edge of a radius around Voidy.
Also, I'm having trouble with variable jumping, I know I want to halve the vertical speed, but I'm not sure how without it being really strange.

Posted: Tue Nov 22, 2011 7:53 pm
by StinkerSquad01
Finishing up the conveyor belt sprites, I have high hopes for this game!

Posted: Tue Nov 22, 2011 8:09 pm
by StinkerSquad01
My code I got for conveyors isn't working. Would anyone care to look at it?

Code: Select all

//going left
if place_meeting(x,y+26,/object_conveyleft/)
x-=speed of conveyor

Code: Select all

//going right
if place_meeting(x,y+26,/object_conveyright/)
x+=speed of conveyor
Y in the place_meeting is the sprite's y + 2, which I don't understand.

Posted: Tue Nov 22, 2011 8:15 pm
by MyNameIsKooky
Well, first of all, you actually have to put in a number for the speed of the conveyors. Second of all, make sure the names of the conveyor objects match the ones in the code (you might wanna remove those slashes).

Posted: Tue Nov 22, 2011 8:28 pm
by StinkerSquad01
MyNameIsKooky wrote:Well, first of all, you actually have to put in a number for the speed of the conveyors. Second of all, make sure the names of the conveyor objects match the ones in the code (you might wanna remove those slashes).
Oops, I had the X in there, I just copied the code from the original site to here and forgot to replace it. What about the Y though?

Posted: Tue Nov 22, 2011 8:33 pm
by MyNameIsKooky
StinkerSquad01 wrote:
MyNameIsKooky wrote:Well, first of all, you actually have to put in a number for the speed of the conveyors. Second of all, make sure the names of the conveyor objects match the ones in the code (you might wanna remove those slashes).
Oops, I had the X in there, I just copied the code from the original site to here and forgot to replace it. What about the Y though?
You're supposed to leave the x. Replace "speed of conveyor" with the speed you want the conveyor to use.

Just to let you know about what x and y mean:
x is the x-position of the object that uses the code (in this case, the player).
y is the y-position of the object that uses the code.

Posted: Tue Nov 22, 2011 8:39 pm
by StinkerSquad01
Got it working (both directions, too!), thank you code-wizard person! :lol:
Screeny!

Posted: Tue Nov 22, 2011 9:08 pm
by StinkerSquad01
Is it possible to make it so I can get my little black orbs to appear around the player randomly at the edge of a small radius? I have the timer ready, but I'm unsure how to get it to spawn like that.

Posted: Tue Nov 22, 2011 9:22 pm
by MyNameIsKooky
Right on the radius, or anywhere inside?

Posted: Tue Nov 22, 2011 9:31 pm
by StinkerSquad01
Right on it. Working on making a click on something with cursor and it toggles function now. EDIT: I got it working, but it toggles all of that item, not just one.
EDIT2: And, if anything touches it and I click it changes. Hmm.
EDIT3: I got the singular thing working, but whenever the cursor touches the object, it doesn't pass through, it just stop until the real cursor (not visible) its off of the blocks, then it jumps.

Posted: Tue Nov 22, 2011 9:56 pm
by StinkerSquad01
[Yeah, its fine.]

Why is my cursor I made not wanting to pass through my new type on conveyor belts? There is only one event: Collision with cursor. Cursor not solid, but conveyors are! The conveyors' functions works fine (except maybe a bit too spazzy if you hold down the button), but the cursor simply does not want to touch those blocks!

Posted: Tue Nov 22, 2011 10:03 pm
by MyNameIsKooky
StinkerSquad01 wrote:[Yeah, its fine.]
Never mind, I got it working properly, so I deleted that post. I've attached the example at the bottom of this post. It doesn't look that pretty, but that depends on the sprite you want to use for the orbs.
StinkerSquad01 wrote:Why is my cursor I made not wanting to pass through my new type on conveyor belts? There is only one event: Collision with cursor. Cursor not solid, but conveyors are! The conveyors' functions works fine (except maybe a bit too spazzy if you hold down the button), but the cursor simply does not want to touch those blocks!
If an object is solid, then any non-solid objects with collisions for the conveyor will still collide with it.

Posted: Tue Nov 22, 2011 10:09 pm
by StinkerSquad01
Oooh,very nice! Thank you!
I hate circles and I hate trigonometry.
Suddenly I'm not so sure I will enjoy math in high school.

Anyway, how can I stop the collisions with the conveyors and cursor? I have tried setting the cursor to solid, which didn't work.

Posted: Tue Nov 22, 2011 10:15 pm
by MyNameIsKooky
StinkerSquad01 wrote:Oooh,very nice! Thank you!
You're welcome! :D
StinkerSquad01 wrote:
I hate circles and I hate trigonometry.
Suddenly I'm not so sure I will enjoy math in high school.
The math you'll do in high school is actually pretty easy. I said I hated trigonometry because I had to come up with a way to generate a random point right on the edge of a circle, which requires trigonometry.

Working with points on circles in Game Maker is a pain in the butt if you're not familiar with it. That's why I had so much trouble making the lasers in Evil Toaster 5 (although working with circles in Game Maker is getting easier for me now).
StinkerSquad01 wrote:Anyway, how can I stop the collisions with the conveyors and cursor? I have tried setting the cursor to solid, which didn't work.
Is your "cursor" an object that's following the actual mouse?

Posted: Tue Nov 22, 2011 10:18 pm
by StinkerSquad01
Yes, it is. Does it make a difference? :?

Posted: Tue Nov 22, 2011 10:29 pm
by MyNameIsKooky
Don't use an object for the mouse.

Create a "Game Start" event for the player object. Go to the "other" tab, use "Set cursor", and select the sprite you want to use for the mouse.

Posted: Tue Nov 22, 2011 10:32 pm
by DEEMAN223344
You must have Pro for it, though.
Kooky, You mentioned the lasers from ET5.
Could you help me with something like that? I'm going to use it for part of the first boss where 4 batteries are sending power to an evil robot, and you must destroy each battery.

Posted: Tue Nov 22, 2011 10:36 pm
by MyNameIsKooky
DEEMAN223344 wrote:You must have Pro for it, though.
Oh, right.

Well then, keep the mouse object. In the "Step" event for the mouse object, make the mouse object jump to the position (mouse_x,mouse_y). Don't give it any collision events. If you want an object to do something when clicked, then use the mouse event "Left Pressed" for the object.
DEEMAN223344 wrote:Kooky, You mentioned the lasers from ET5.
Could you help me with something like that? I'm going to use it for part of the first boss where 4 batteries are sending power to an evil robot, and you must destroy each battery.
So, basically, you want lines that connect between the robot and the batteries?

Posted: Tue Nov 22, 2011 10:38 pm
by DEEMAN223344
Yes, and the lines add to the health every 30 frames.

Posted: Tue Nov 22, 2011 10:45 pm
by StinkerSquad01
MyNameIsKooky wrote:Well then, keep the mouse object. In the "Step" event for the mouse object, make the mouse object jump to the position (mouse_x,mouse_y). Don't give it any collision events. If you want an object to do something when clicked, then use the mouse event "Left Pressed" for the object.
I have no collision on the cursor object, just the conveyors. I was hoping you could move the cursor over the object, click on it, and it would toggle directions. (Which reminds me, if I hold it, it spazzes out, anyway to make it just change on the click on not the hold?)

Posted: Tue Nov 22, 2011 10:50 pm
by MyNameIsKooky
StinkerSquad01 wrote:
MyNameIsKooky wrote:Well then, keep the mouse object. In the "Step" event for the mouse object, make the mouse object jump to the position (mouse_x,mouse_y). Don't give it any collision events. If you want an object to do something when clicked, then use the mouse event "Left Pressed" for the object.
I have no collision on the cursor object, just the conveyors. I was hoping you could move the cursor over the object, click on it, and it would toggle directions. (Which reminds me, if I hold it, it spazzes out, anyway to make it just change on the click on not the hold?)
I meant not to have the cursor object have ANY collisions with other objects. Just use the event "Left Pressed" for the object you want to be clicked.
DEEMAN223344 wrote:Yes, and the lines add to the health every 30 frames.
Simple. Use this code in the draw event for the battery:

Code: Select all

draw_line_color(x,y,BossRobot.x,BossRobot.y,c_green,c_green)
draw_sprite(Battery,0,x,y)
Have the batteries use alarms to add to the robot's health. No line collisions are needed. :wink:

EDIT: Edited the code so that it works correctly.

Posted: Tue Nov 22, 2011 10:59 pm
by StinkerSquad01
Tried it, and nothing happens when I click it! Trying something else real quick. EDIT: Didn't work. I tried Released and just the button too.

Posted: Tue Nov 22, 2011 11:00 pm
by MyNameIsKooky
StinkerSquad01 wrote:Tried it, and nothing happens when I click it!
Make sure the "Left Pressed" event is in the object you want to click.

Posted: Tue Nov 22, 2011 11:01 pm
by StinkerSquad01
It is.

Posted: Tue Nov 22, 2011 11:02 pm
by MyNameIsKooky
Click on the "Show information" button of the object and copy/paste the contents of the window here.

Posted: Tue Nov 22, 2011 11:05 pm
by StinkerSquad01

Code: Select all

Information about object: obj_conveyrights
Sprite: spr_conveyrights
Solid: true
Visible: true
Depth: 0
Persistent: false
Parent: 
Mask: 

Mouse Event for Left Pressed:

change the instance into object obj_conveylefts, yes performing events

Code: Select all

Information about object: obj_conveylefts
Sprite: spr_conveylefts
Solid: true
Visible: true
Depth: 0
Persistent: false
Parent: 
Mask: 

Mouse Event for Left Pressed:

change the instance into object obj_conveyrights, yes performing events