Jump to content


deathzero021

Member Since 19 Nov 2009
Offline Last Active Today, 05:50 AM

Topics I've Started

unknown variable x

18 November 2012 - 05:53 PM

if place_meeting(x,y,obj_wall)
    {
    wid=collision_rectangle(x-8,y-7,x+8,y+7,obj_wall,1,1);
    dir = point_direction(wid.x,wid.y,x,y);
    move_outside_all(dir,4);
    }
OK Game Maker, what's wrong this time? Can't find the variable x? that's your own variable! You must be getting old...

Anyway, any one have any ideas how to prevent this error? The error message simply says unknown variable x, it does not say unknown variable wid. using debug, wid has an id, the same id as the wall instance. obviously the wall has an x variable. so WTF?

this isn't the first time GM has done this to me. i usually have to just work around it or ignore it but i would really like to find out what causes this.

Headaches

18 November 2012 - 05:30 PM

This isn't a topic about "how to prevent" or "how to cure". It's a topic merely asking how many people here get them periodically AND how do you cope with it?

I get them very often, it's become a daily part of my life basically. You could say i'm used to it. It doesn't bother me as much as it did years ago when it was new to me but it still pretty annoying.

I usually wake up with one, if i try to take things slow for the earlier parts of the day, it'll go away. However if i'm working it'll usually get worse. Seems any physical activity leads to headaches. Also sleeping, i don't like to sleep much. If i do i'll wake up with a major one.

The common minor headaches i just ignore and try not to bother them much. That's why sitting at the computer quietly is what i do most. If i have a huge headache though, obviously i get sensitive to everything. Movement, lights, noise, you name it. So the only way to cope with these suckers is to sit silently in a chair with my neck back and just wait it out. I also try pain killers at this level but they have little to no effect to me because i've been taking them for years. (which i dont recommend, it's very bad for your health. possible side effects can be stomach bleeding, a massively painful experience)

I'm sincerely interested in what others with headaches have to say, so speak up guys  :mellow:

TL;DR
Spoiler

Filling grid cells

14 November 2012 - 06:33 AM

This seems hard to explain but i'll try to show it rather than explain it.

here is what a grid might look like:
000000
010001
011000
000011
000100

now what does that mean? well let's just say that 1 represents an object is there, and 0 means there is nothing there.

what i want to do is change all the 0's to a value, if it is completely surrounded by 1's. In the above example it obviously wouldn't produce anything. However in this example it would:
000000
011110
010010
011110
000000

as you can see, there are two 0's in the middle that are completely surrounded by 1's. i want to change these 0's to 2. Filling them with a new value.
i've tried simple things like loops that cycle through cells and try to find a middle point to work outwards from. (this is done by having a different instance in one of the middle cells) but the results are pretty crap. here's an example:
001000
010110
012221
012210
011210
001110

you can notice a 0 inside the box of 1's. this is the kind of results i get with my ideas. So my question is, how can i do this more efficiently?

i won't be able to post any code, since all of the above isn't real examples from the game i'm working on, but a representation of. Also my code is extremely complicated with tons of different unusual var names being used all over the place, it's a damn mess...

I'll try to post some representation of code here though:
repeat(N)
{
repeat(N)
{
if cell[xx,yy]<1
{
cell[xx,yy]=2
xx+=1;
}
if cell[xx,yy]=1 break;
}
yy+=1;
if cell[xx,yy]=1 break;
}
this is pretty close to what im doing. the starting xx,yy is usually in the middle of the box, or somewhere near that. the general idea is to move outwards and fill up as many cells as possible, and stop when it hits a wall, and start a new direction. obviously this wont fill up everything as there are corners and narrow passages it doesnt get too.

Bookmarks/Favorites

06 November 2012 - 06:24 PM

Bookmarks as in Firefox, they used to be called Favorites in older Internet Explorer. (not sure if they still use that term now though)

I remember all the URL's to the sites i visit so it really isn't important for me to keep bookmarks. I often use them to keep track of a page i will return to that is specific to something important, like a certain item on amazon, because it would take too much time to research for it again. I do however still have bookmarks for all the usual sites i visit. I do this so that when i type up 'G' in the address bar, GMC will pop up in autocomplete and all i have to do is hit ENTER. this is much faster.

that being said, my bookmarks are very well organized. i have folders for videos, forums, shopping and more. Do anyone else organize bookmarks or use them at all?

Over time i see the concept of them becoming less important for some reason. just feels like with how flexible the Firefox address bar is, it's almost pointless. type up GMC even without the autocomplete, Firefox can find the domain for me, or if not, search on google and that's quick enough, it'll be the first or second link and all i gotta do is click it.

i actually like the name Bookmark, it implies what it's most useful for, returning to something later and than removing it after you have returned which i do a lot.

Pranks

21 September 2012 - 03:34 AM

Post your favorite pranks, prank videos or scares!

this series is one of my favorites! (be warned, i watched 2 hours of these guys! they're brilliant)

here are some japanese ones i found too:
Stairs Prank
Crowd Prank
Ghost Prank
Sniper Prank

and a classic one:
Scary Maze Prank