[ home / board list / faq / random / create / bans / search / manage / irc ] [ ]

/agdg/ - Amateur Game Development General

AGDG - The Board

Catalog

See 8chan's new software in development (discuss) (help out)
Please read: important information about failed Infinity Next migration
Name
Email
Subject
Comment *
File
* = required field[▶ Show post options & limits]
Confused? See the FAQ.
Embed
(replaces files and can be used instead)
Oekaki
Show oekaki applet
(replaces files and can be used instead)
Options
dicesidesmodifier
Password (For file and post deletion.)

Allowed file types:jpg, jpeg, gif, png, webm, mp4, swf, pdf
Max filesize is 8 MB.
Max image dimensions are 10000 x 10000.
You may upload 5 per post.


Welcome to AGDG, have you ever made a game?
See also: /ideaguy/ | /vm/

File: 1449912077747.webm (2.23 MB, 640x360, 16:9, How2gamemaker.webm)

72b6af No.24391

Somebody help me please, i'm really stuck.

I'm using game maker

I've created 5 different paths in the same grid.

Then i've set some variables so that the selected unit follows a different path based on what you've clicked (it can be a resource or just the terrain).

I've got two problems now: when you click a resource, the unit follows it's path nicely, but when you click a different resource before it has reached the first one, it bugs out to the top left.

The other problem is that if i click an empty space, the unit seems to "forget" its path when i click the resource later and just goes in a straight line.

I've also tried creating a different grid for each path, but it didn't work

e4d63b No.24405

Check your variables. You might be assuming something exists that doesn't exist once it's following a path, you might be adding to or multiplying a variable that works the first time but gets too big/small times after that, you might have reused a global variable's name locally so it doesn't transfer, you might be setting something in the grid object that you should be keeping local to the unit or who knows what else.


d5b1c3 No.24411

YouTube embed. Click thumbnail to play.

>>24391

>I've got two problems now: when you click a resource, the unit follows it's path nicely, but when you click a different resource before it has reached the first one, it bugs out to the top left.

Changing paths while they're followed doesn't really work like you would think. You have to end the current path first (path_end())

Video related is pretty good to understanding paths in GMS


e983a8 No.24414

>>24411

This is correct.

Source: I've had OP's problem before.

GameMaker is not sure what you want it to do with the existing movement, so it's just discarding your usage of both paths and defaulting to the top-left.

Word of warning, the path system in GameMaker is really fucking shit.

Find someone that has made scripts to work with them easier.


090334 No.24419

>>24414

>Word of warning, the path system in GameMaker is really fucking shit.

Agreed, stay way the hell away from paths when and if you can. I don't think there's anything a path can do that a little math and graph functions can't (except maybe circles, but I just haven't figured that out yet).

Polite sage because there's already a GM:S thread for these sorts of questions.


72b6af No.24444

>>24419

Where's that thread?


72b6af No.24518

>>24444

I solved my own problem, so now i'll check my own quads while saging my own thread


404695 No.24523

>>24444

>>24518

Nice quads, but there's a GM:S General:

http://8ch.net/agdg/res/29.html




[Return][Go to top][Catalog][Post a Reply]
Delete Post [ ]
[]
[ home / board list / faq / random / create / bans / search / manage / irc ] [ ]