Author Topic: Player Start object is not working, need help. Again.  (Read 2169 times)

MatthewRPG

  • Guest
Player Start object is not working, need help. Again.
« on: March 28, 2015, 09:57:30 AM »
It appears as if every single time I  press 'R' in my fangame, I reset to where  the "playerStart" object is, no matter where I saved. (in the first room, at least.)

"playerStart"'s "Room Start" Code:
Code: [Select]
if(!instance_exists(player)){
  instance_create(x+17,y+23,player);
}

Which I did not change in the slightest. So I honestly have no idea what's going on.

lawatson

  • The Kid
  • Posts: 331
  • I do things and I make things.
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 41.0.2272.101 Chrome 41.0.2272.101
    • View Profile
  • Playstyle: Keyboard
Re: Player Start object is not working, need help. Again.
« Reply #1 on: March 28, 2015, 11:32:38 AM »
That's the same code that I have for my playerStart object, it sounds like the problem is that the room keeps restarting instead of just the game. Look in the world's Press R event and tell me what is in there.
(click to show/hide)

smoke weed everyday

MatthewRPG

  • Guest
Re: Player Start object is not working, need help. Again.
« Reply #2 on: March 28, 2015, 12:02:52 PM »
That's the same code that I have for my playerStart object, it sounds like the problem is that the room keeps restarting instead of just the game. Look in the world's Press R event and tell me what is in there.

Code: [Select]
if(room != rInit && room != rMatthewRPG && room != rTitle){
  sound_stop_all();
  loadGame();
}
"rMatthewRPG" is the intro screen, by the by.
Oh, and I'm using Minwa engine, in case you were wondering.

lawatson

  • The Kid
  • Posts: 331
  • I do things and I make things.
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 41.0.2272.101 Chrome 41.0.2272.101
    • View Profile
  • Playstyle: Keyboard
Re: Player Start object is not working, need help. Again.
« Reply #3 on: March 28, 2015, 01:04:41 PM »
What's in your loadGame script?
(click to show/hide)

smoke weed everyday

MatthewRPG

  • Guest
Re: Player Start object is not working, need help. Again.
« Reply #4 on: March 28, 2015, 01:16:34 PM »
What's in your loadGame script?
Code: [Select]
var f;

if !instance_exists(player){
  instance_create(0,0,player);
}

f = file_bin_open("temp",1);
file_bin_write_byte(f,global.savenum);
file_bin_close(f);
saveExe();
tempExe();

lawatson

  • The Kid
  • Posts: 331
  • I do things and I make things.
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 41.0.2272.101 Chrome 41.0.2272.101
    • View Profile
  • Playstyle: Keyboard
Re: Player Start object is not working, need help. Again.
« Reply #5 on: March 28, 2015, 02:52:31 PM »
And in your tempExe script?
(click to show/hide)

smoke weed everyday

MatthewRPG

  • Guest
Re: Player Start object is not working, need help. Again.
« Reply #6 on: March 28, 2015, 03:50:45 PM »
And in your tempExe script?
Code: [Select]
var f;
f = file_bin_open("temp",0);
global.savenum = file_bin_read_byte(f);
file_bin_close(f);
saveExe();
(Sorry for the late response, internet kinda died.)

MatthewRPG

  • Guest
Re: Player Start object is not working, need help. Again.
« Reply #7 on: March 29, 2015, 01:47:11 AM »
Okay. For whatever reason, the Player object was not persistent. The problem is now resolved. Sorry for wasting your time.  :FailFish: