p_vehicle might never be exactly at position special_entity.x.
Perhaps, you should use a distance check instead.
Code:
define _quitTriggerDist, skill1; //set this in WED
//uses: _quitTriggerDist
action special_entity {
while (p_vehicle == null) {wait (1);} // wait until the player is created
while (my != null) {
if (vec_dist(p_vehicle.x, my.x) <= my._quitTriggerDist) { // the player has come close to the door
quit();
}
wait (1);
}
}
I probably wouldn't use the door entity's position. I would probably use an additional entity which might placed inside of the garage.