Dinasty wrote:self.go.map
dungeon_secret_door_1.map
party.map
all of theese works, thank you

Duncan1246 wrote:What difference does it make?
It is that party.map is always the current level; [where the party object is]; self.go.map (and dungeon_secret_door_1.map) might not be [it's whatever level the object is on]. So if a script runs while the player is on a different floor than expected (or assumed), then that script can potentially use the wrong map.
If Dinasty's script used party.map, and the party were to drop the item through a pit onto the tile below, then it would fail to detect, because that script would then check for the object on the party's level ( one or more floors above ~in the tile where the pit is). If the party isn't on that level, or leaves the level before the test is performed, then it will not check the correct tile. If the check is on a slow timer, the player might be able to use a pit, teleporter, or a stairway before the itemCheck() test.
**Also: If dungeon_secret_door_1 (or any other object used for its map location) is destroyed, that reference in the script becomes nil; that's something to bear in mind when using it.
The party.map, and self.go.map references never become nil for an active script.