Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
* Fixed the step event code of the triggers.
  • Loading branch information
TML233 committed Apr 17, 2019
1 parent edf9965 commit d7e17be
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
3 changes: 2 additions & 1 deletion objects/trigger/Create_0.gml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
user_char=-1;
_triggered=false;
_triggered=false;
_collided_previous=false;
28 changes: 14 additions & 14 deletions objects/trigger/Step_0.gml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
var user=user_char;
if(user!=-1){
var result=false;
if(instance_exists(char)){
with(char){
if(char_id==user||user==-1){
result=place_meeting(x,y,other);
if(result){
break;
}
var result=false;
if(instance_exists(char)){
with(char){
if(char_id==user||user==-1){
result=place_meeting(x,y,other);
if(result){
break;
}
}
}
if(!_triggered&&result){
event_user(0);
}else if(_triggered&&!result){
event_user(1);
}
}
if(!_triggered&&result){
event_user(0);
_collided_previous=true;
}else if(_triggered&&_collided_previous&&!result){
event_user(1);
_collided_previous=false;
}

0 comments on commit d7e17be

Please sign in to comment.