Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: 1 [2]   Go Down

Author Topic: [Request / Solved] [GML]Unwanted speed increase at room warp.  (Read 9434 times)

0 Members and 1 Guest are viewing this topic.
Re: [GML]Unwanted speed increase at room warp.
« Reply #20 on: April 09, 2006, 08:19:22 am »
  • The Broken King
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1259
when the player was created in the next room, the script was run again. It just didnt' go away when the player was destroyed, I guess.
Logged
  • Broken Kings [Temp Site]

some_damn_canadian

Re: [GML]Unwanted speed increase at room warp.
« Reply #21 on: April 09, 2006, 04:55:25 pm »
I figured it out and fixed it.

I'll send the file to you after...

for the reference of those that may encounter similar problems, the issue is that he loaded the script every time the player was created.
This accumulated, so that the step even that causes the player to move 2 frames per second loaded every time the object was created. So that after the object was created twice, it had this code twice, and therefore, executed it twice. And so on.

The solution was like this:

Code: [Select]
if(!global.player_loaded)
{
    execute_file(dir_obj+'cm_obj.dat');
    global.player_loaded = true;
}

Then I set global.player_loaded to false in the starting room (he may want to change that later).

I GET IT! n__n Even though the speed didn't change, the script he used to move the character was executed twice! n__n Lol, I didn't see that. =P
Logged

Gyrowolf

Re: [GML]Unwanted speed increase at room warp.
« Reply #22 on: April 09, 2006, 08:14:52 pm »
Thank you both for your help, I appreciate it. :)
Logged
Pages: 1 [2]   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.25 seconds with 43 queries.