Then I've added another event Alarm 0 to the wall, added a script to it with direction = direction, same thing happens. If place_meeting(x,y,obj_playerM) & (keyboard_check(ord('W'))) I wrote this in the script for Collision event: Create 2 new sprites and name it as sprcircle and sprcolors. Step 3: In this drag drop gamemaker tutorial, we need two sprites. Step 2: Create a new game maker project and name it as Drag-Drop. I didn't test this but maybe where it says says direction = direction + 180 put under that alarm = 10 and then in the alarm event put direction = direction Both masks are set to Precise Collision checking. Step 1: Download 1 white cirle and 6 sample color boxes includes gray, green, yellow, red, violet, and sky (light blue). As far as the player going back forever it's because you need something like an alarm to reset your direction back to normal I don't know why the wall would be attracting your player, that's another issue. Originally posted by MinorThreat:there could be an issue with your wall mask or player mask causing them to meet before it looks like they should. This tutorial will take you through the process of making. You will learn how to make a playable character, generate infinite obstacles, build a solid game loop along with menus and much more. How would I say if key W or S is pressed? if keyboard_check(ord('S')) - keyboard_check(ord('W')) ? I likely am writing this code wrong, because it won't compile. Welcome to the Fire Jump tutorial This series will take you through developing an infinite platformer game in GameMaker Studio 2 using Drag and Drop. I just don't know how to put the if condition for letters. (and yes, I am applying these Actions to the wall itself, not the player, but it's set to affect the player for each action). This is the list of actions that pretty much does what I need it to do, with the exception that it does not recognize that I am pressing W A S or D so if I keep the key pressed, it does not repel it, but if I let go, it bounces perfectly. Isn't there some way to set a variable/code here for Collision Event that says "If player presses keys W or S" and then have a block of code under it, that tells it "Execute reverse vertical direction" (and same for A and D with horizontal direction)? The code actually stops the player from going too far from the wall, but it acts as if the wall is repelling the player constantly, without letting it touch it at all for as long as I keep a key pressed. I've only used this code with bullet type objects not the player character, so there maybe problem using this code I'm not aware of. You would have to have some kind of decelerator on your movement or an alarm or something to stop your guy after bouncing If place_meeting(x,y,obj_wall) //or whatever your wall object is calledÄirection = direction + 180 //or whatever angle you would like Originally posted by MinorThreat:you could try
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |