- Joined
- May 10, 2016
- Messages
- 446
- Reaction score
- 17
- First Language
- French
- Primarily Uses
I try to push a event using javascript on player touch.
Of course I know its can be done easy with event, but curently I try to do some test for learning.
I use the follow code.
I got error undefined is not a function.
I try to look inside rpg_object.js but didt find yet what i looking for.
Expected result: If player try to push the box but the box cant be push its do nothing, else, the objet got push and player move to.
Of course I know its can be done easy with event, but curently I try to do some test for learning.
I use the follow code.
Code:
this.event().moveStraight($gamePlayer.direction());
if (this.event().isMoving()){
$gamePlayer.moveForward();
}
I try to look inside rpg_object.js but didt find yet what i looking for.
Expected result: If player try to push the box but the box cant be push its do nothing, else, the objet got push and player move to.

