Jump to content


ParrotPeach

Member Since 18 May 2012
Offline Last Active Sep 28 2012 12:35 AM

Topics I've Started

*Solved* Been gone for the summer -

26 September 2012 - 06:32 PM

Hello again,

I've been gone for about 3 months - just to jump back to my GM Studio... I missed it. However...

All my demos with  mypath=path_add(); won't work now... they did work without error in GMS in July.

Did I miss a memo or something? Do the path-finding examples I'm learning from still work in Studio?
Is there a new way of doing path-finding in GMS?

Can someone please help or point me to the right direction? I can add more info and code if you need me to.

Thanks so much!

*edit* I just wanted to add a little more info - all the examples with mypath=path_add(); still work great with GM 8.1

in GMS I get this > In object ship, event Create, action 1 at line 22: Unknown function or script: path_add

.

Tower defence. Target instance closest to exit?

08 June 2012 - 08:28 PM

Hello. I'm working on a tower defense project and I was wondering how to make my towers target an enemy closest to the exit_object?

I like to use the standard 'if in range target the instance_nearest (enemy)'
But how would I target enemies closest to the exit_object while keeping my 132 range?

What I use for instance_nearest...

object = instance_nearest(x,y,enemy);
if (distance_to_object(object) < 132) and can_fire = true
{
instance_create(x,y,bullet);
}

Any suggestions would help. Please and thank you :thumbsup:

Push blocks not snapping correctly.

05 June 2012 - 03:56 PM

Hello. I was working on a project and it seems I hit this stop sign.

I have my main object following my mouse while snapping to the grid 32x32.
I also created blocks for this object to push via: (collision event). Well it worked on GM81 but it's not working in the GMS...
Yes, I know we need to rewrite everything but I can't seem to get it to work again. I tried almost everything.

So my question is:
If your main object is following your mouse while snapping to the grid at 32x32 which would be the best method for a collision to push blocks that also snap 32x32?

collision code that worked on GM81:
var x_hit,y_hit,side;
x_hit = x; y_hit = y;
x = xprevious; y = yprevious;
other.solid = true;
move_contact_solid(point_direction(x,y,x_hit,y_hit),
point_distance(x,y,x_hit,y_hit));
other.solid = false;
if (bbox_left > other.bbox_right) {other.x -= push_amount; x -= push_amount; hspeed = 0;}
else if (bbox_bottom < other.bbox_top) {other.y += push_amount; y += push_amount; vspeed = 0;}
else if (bbox_right < other.bbox_left) {other.x += push_amount; x += push_amount; hspeed = 0;}
else if (bbox_top > other.bbox_bottom) {other.y -= push_amount; y -= push_amount; vspeed = 0;}

You see that kinda works, but when they hit a wall now they get stuck or they pass though.

PS.

Also I use x=xprevious y=yprevious to stop the push blocks at the walls but that doesn't seem to work now ether.
To make matters worse, my main object is jumping (passing) right through the walls now. IDK what I did wrong.

Any suggestions? I do appreciate it. Thanks. :thumbsup:

Blood / Gore in games? Who rates this?

04 June 2012 - 07:14 PM

Hello. I was just wondering about the rating system. (E, T, M) ESRB content.
My question is if you sell your game... who rates your game if there is blood and violence in it?

If you sell your game on the market are you as the developer responsible to rate it first? Just wondering how this works...

Thank you in advance. :thumbsup:

*SOLVED* If position is collision free.

28 May 2012 - 07:06 PM

*** SOLVED *** Thanks, Noc.