I have some moving spikes which, if the player touches them when the spikes are up, will call a common event. Here is a screenie of the event page with that call.
You are unable to see the full script call in the shot. It is this:
$game_player.x == $game_map.events[event_id].x && $game_player.y == $game_map.events[event_id].y
The event page is set to parallel process because otherwise if the player is standing on the tile when the spikes come up, the call to the common event is not triggered. Page one only contains the other half of the up and down movement of the spike (both bits are contained within the custom movement).
The common event which is called is this:
When the player enters the map, even before the transfer fadein has happened, the following error message comes up:
Scrip 'Game_Interpreter' line 450: NoMethodError occurred
undefined method 'x' for nil:NilClass
Line 450 is about evaluating param 1 - which is HP. But nothing here is asking anything about HP. I therefore have no idea what could be wrong.
Any help would be much appreciated.
Thank you.
EDIT
If I start a New Game on this map, which is what I did for testing purposes, there is no problem. The error message only occurs if I transfer to the map from somewhere else.
You are unable to see the full script call in the shot. It is this:
$game_player.x == $game_map.events[event_id].x && $game_player.y == $game_map.events[event_id].y
The event page is set to parallel process because otherwise if the player is standing on the tile when the spikes come up, the call to the common event is not triggered. Page one only contains the other half of the up and down movement of the spike (both bits are contained within the custom movement).
The common event which is called is this:
When the player enters the map, even before the transfer fadein has happened, the following error message comes up:
Scrip 'Game_Interpreter' line 450: NoMethodError occurred
undefined method 'x' for nil:NilClass
Line 450 is about evaluating param 1 - which is HP. But nothing here is asking anything about HP. I therefore have no idea what could be wrong.
Any help would be much appreciated.
Thank you.
EDIT
If I start a New Game on this map, which is what I did for testing purposes, there is no problem. The error message only occurs if I transfer to the map from somewhere else.
Last edited by a moderator:

