Recent Forum Posts
From categories:
page 1123...next »

Could you not just in maybe the step event of on object use the code

//insert new code
old_var = new_var
Re: Replacing a variable name throughout your entire game by louiskeplerlouiskepler, 1258752234|%e %b %Y, %H:%M %Z|agohover

Can you upload the file?

Re: Hey new here :P need help :) by NicAdiNicAdi, 1258748191|%e %b %Y, %H:%M %Z|agohover

Of course you need to keep track, one way or another, of the items collected. But it seems to me rather awkward to do that for each and every item (i.e. on the "things" side). It makes more sense to have an inventory variable on the Player/Character side; since usually inventories have limited slots (i.e. the Player can carry just a few "things", while there could be many, many more in the whole game), this looks like a better, more economical way to do it.

by NicAdiNicAdi, 1258747932|%e %b %Y, %H:%M %Z|agohover

Hoo-bleedin-rah: got it!
Just gonna explain quickly in case anyone else needs this, as it was a nightmare to find any help on.

Paths cannot be moved while there is an instance following them.

After assigning path(in Create event):
CREATE EVENT

//create variable for old position
pos = path_position
//take object off path
path_end();
//move path to view
path_shift(path0, 0, view_yview)
//put object back on path, absolute = true
path_start(path0,1,0,true);
//move along path a bit
path_position = pos + 0.004;

STEP EVENT

pos = path_position
path_end();
//move path with view (in this case, y -1)
path_shift(path0, 0, -1)
//put object back on path
path_start(path0,1,0,true);
//move a bit
path_position = pos + 0.004;

Hope this helps other people. gawd knows i struggled with it.

Re: Moving a path with the view by shwhjwshwhjw, 1258747299|%e %b %Y, %H:%M %Z|agohover

Thanks, found a method called path_shift() that is supposed to move the path, but I have no idea of the syntax, and can't seem to find anywhere that explains it. Can anyone help?

Re: Moving a path with the view by shwhjwshwhjw, 1258743622|%e %b %Y, %H:%M %Z|agohover

try checking the the game maker manuel (that comes with game maker)

Re: Moving a path with the view by mr glassesmr glasses, 1258740367|%e %b %Y, %H:%M %Z|agohover

I realise I could edit the path points to compensate, but the path has circles, and it'll take forever to get it right. Just looking for an easier way!

Re: Moving a path with the view by shwhjwshwhjw, 1258734287|%e %b %Y, %H:%M %Z|agohover
Moving a path with the view
shwhjwshwhjw 1258733034|%e %b %Y, %H:%M %Z|agohover
in discussion The Community / Game Maker Help » Moving a path with the view

Hi,

I'm working on a project which uses a view, which moves from the bottom of the room to the top.

It needs to have an object follow a path, left to right across the view. The path is working, however because the view is moving up, it causes the object to appear to shift downwards, instead of staying at the view's vertical position.

I've tried moving the object itself up every frame (both with 'jump to position' and 'set vertical speed'), which has no effect. Not sure what else to try.

Is there any way to move the path with the view? I'm using GM Pro.

Thanks,
Simon.

Moving a path with the view by shwhjwshwhjw, 1258733034|%e %b %Y, %H:%M %Z|agohover

Hey, ma names Ryan and i am a student. I am working on a course at the moment and i need to create a game. The problem i am having is that after deciding to create a missile defence game, the turret doesn't work correctly.

I followed this tutorial, because it is 99% similar to what i want.http://gamemaker.wikicomplete.info/helprequest:how-do-you-make-the-mouse-act-as-point. I want to be able to have a turret that follows the mouse in a 90 degree angle and stop past that, after following this tutorial, it works however, if i go past 90 degrees its flicks back to the original frame.

Sorry if it isn't explained very well but i quite literally started game making about 2/4 weeks ago :P

Thanks. Ryan.

Hey new here :P need help :) by KrakkenKrakken, 1258728909|%e %b %Y, %H:%M %Z|agohover

Currently I'm making the lesser enemy sprites (i.e. non-boss enemies). I'm gonna be away during Thanksgiving week, in a place that's kinda in the sticks (and thus internet access is at a crawl). So don't fret if you don't hear from me.

Status Report on Light Whip Leroy by D-BoyWheelerD-BoyWheeler, 1258722432|%e %b %Y, %H:%M %Z|agohover
Re: Jumps and Jumps
DaedricLordDaedricLord 1258703666|%e %b %Y, %H:%M %Z|agohover
in discussion The Community / Game Maker Help » Jumps and Jumps

What exactly are you trying to accomplish? Just a simple jump? double jumps? Are you having problems making the character jump or is it having them come down or is it stopping when the character hits the ground?

Re: Jumps and Jumps by DaedricLordDaedricLord, 1258703666|%e %b %Y, %H:%M %Z|agohover

I don't see how you could do it without some variable telling it whether an item was picked up or not. I mean if you have an item picked up then you don't want to pick it up again when you click the pickup/drop action you want it to drop the item not pick it up again. If you can think of a way to do it without the variable the please tell me, I would like to know how else you could do it.

itemToPickUp.pickedup? Why?!? answer by DaedricLordDaedricLord, 1258703099|%e %b %Y, %H:%M %Z|agohover
I art a n00b
mysterious bmysterious b 1258671452|%e %b %Y, %H:%M %Z|agohover
in discussion The Community / How May We Help You? » I art a n00b

hello i had recent geek aspirations so i began reading some articles on coding in basic. i was talking to my friend during lunch and he reffered this to me. and here i am. i dream of creating a cross-referencing database to determine the statistically best hockey players of all time. or create a computerized judicial system

I art a n00b by mysterious bmysterious b, 1258671452|%e %b %Y, %H:%M %Z|agohover

That's definately something that I'm gonna fix. The whole view movement system will be completely revamped…

Re: Battle Grounds (WIP) by mr glassesmr glasses, 1258669358|%e %b %Y, %H:%M %Z|agohover

Just remember that this is my first game, so I'm using the lite edition.

Re: Orange Spook (WIP) by ChaosStarChaosStar, 1258662649|%e %b %Y, %H:%M %Z|agohover

The view moves down when you hover the mouse over the HUD. I found that extremely annoying.

Re: Battle Grounds (WIP) by kake_fiskkake_fisk, 1258646051|%e %b %Y, %H:%M %Z|agohover
Re: Jumps and Jumps
louiskeplerlouiskepler 1258586970|%e %b %Y, %H:%M %Z|agohover
in discussion The Community / Game Maker Help » Jumps and Jumps

Yeah and if you want a double jump effect you can use a variable to an effect of:

In the create event:
jumps = however many jumps you want to be able to do
jumpable = jumps

In the jump event:

if jumpable < jumps +1
-do the code for jump-
jumpable -=1

In the collision with ground event:

jumpable = jumps

I used this in a couple of games each with a different means of jumping but in all of them I was able to limit the number of jumps until the player hit the floor.
Be wary, though you have to make the ground object different from say a wall or ceiling. other wise you will have to find out which side of it you are hitting and that can take awhile, I find.

Re: Jumps and Jumps by louiskeplerlouiskepler, 1258586970|%e %b %Y, %H:%M %Z|agohover
Re: Enemy line of sight
NicAdiNicAdi 1258585808|%e %b %Y, %H:%M %Z|agohover
in discussion The Community / Game Maker Help » Enemy line of sight

Sir_WillardSir_Willard: […] shouldn't some kind of tolerance be added to the code | if (direction == point_direction(x, y, OPlayer.x, y))

No, it shouldn't. I know what you're talking about, but that's not the case here. The main reason is that this particular game is some sort of platformer (as suggested by a statement made in a previous post that the Enemy units can only move LEFT or RIGHT), thus direction can only be either 0o or 180o. That takes care of one side of the identity; as for the other, you may notice that I have used __the same value (i.e. y) for the two 'y' coordinates required. This guarantees the vector whose direction is being evaluated is horizontal, thus its direction, again, can only be either 0o or 180o.

In conclusion, additional tolerances are not required simply because there are no "rogue" values that can be produced on either side of the identity.

Re: Enemy line of sight by NicAdiNicAdi, 1258585808|%e %b %Y, %H:%M %Z|agohover

Recen;ty I have been working on battle grounds. It is an RTS…but it definately is unique. Hartnell might recognize this project. Anyway. I just released prototype V0.4 and was looking for some pointers. More information about the game and a download link can be found here.

Just to wet your appatite:
screenshot100.png

Battle Grounds (WIP) by mr glassesmr glasses, 1258565279|%e %b %Y, %H:%M %Z|agohover
Re: Enemy line of sight
Sir_WillardSir_Willard 1258530308|%e %b %Y, %H:%M %Z|agohover
in discussion The Community / Game Maker Help » Enemy line of sight

Not to jump into this at the very end and nitpick the code, but shouldn't some kind of tolerance be added to the code

if (direction == point_direction(x, y, OPlayer.x, y))

from my experience, this fails a good amount of the time, since the direction isn't rounded. You have to be pixel for pixel lined up in that direction for this code to work consistently.

Of course, I've been out of this for a while. Just an observation.

Re: Enemy line of sight by Sir_WillardSir_Willard, 1258530308|%e %b %Y, %H:%M %Z|agohover