![]() ![]() But here's a version I would use myself I believe.įirst, you're going to need two variables/properties to define the current risk of encounter, and the rate of encounter. I can't talk about the code you're using, since I don't have the context of your project. Now my question: How can I make a system that tracks steps OR that can generate random encounters using my current movement system? I'm assuming I'll have to change this code to be more like a 1 step at a time system. If (_kDown & !place_meeting(x, y + moveSpeed, oWall)) If (_kUp & !place_meeting(x, y - moveSpeed, oWall)) If (_kRight & !place_meeting(x + moveSpeed, y, oWall)) If (_kLeft & !place_meeting(x - moveSpeed, y, oWall)) I am currently using the following code for movement: var moveSpeed = 4 Now I obviously know that I need to count my steps in order for this to work, but I'm not entirely sure how I would count my steps. There is one problem however, this system uses a variable called "steps" and I currently don't have that variable. /This code should run when you take a step: ![]() I am currently working on a random encounter system and I found this piece of code on Reddit which could be usefull ///This code should be under your object's create event: I am trying to make a simple RPG just for fun. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |