H
hisoka_2020
Guest
This is my first time in years asking for help. so I hope someone out there could help me.
here's an explanation of my problem:
I'm making a mini RPG game and i have a new enemy that follows his comrades around and heals them.
For some reason the new enemy doesn't seem at all to respond to the collision events.
Not for the walls, he just passes strait through them.
Not for the bullet that the player shoots, he's just ignores it.
The main thing I thought causing the problem was that he's running a for() command in his step event, so I thought the computer (not so great) might not be as functional as first seemed.
But further experimentation proved that it's not the computer's fault
Here are the things I've tried to do in order to fix said problem:
-Reinstall game maker.
-Copy the healer and the bullet and destroy the previous ones.
-I've tried putting the piece of code in both the healer and the bullet.
-I've tried changing the collision event of the healer with the wall to say
-I've tried changing the collision event of the bullet with the healer to say
-I've tried creating a new independent object and told it to get destroyed when ever it comes to contact with the healer (doesn't work).
Here's the code pieces:
THE BULLET:
Collision with wall:
Collision with the healer:
THE HEALER:
Collision with wall:
NOTE: The bullet is in fact on
Thanks!
here's an explanation of my problem:
I'm making a mini RPG game and i have a new enemy that follows his comrades around and heals them.
For some reason the new enemy doesn't seem at all to respond to the collision events.
Not for the walls, he just passes strait through them.
Not for the bullet that the player shoots, he's just ignores it.
The main thing I thought causing the problem was that he's running a for() command in his step event, so I thought the computer (not so great) might not be as functional as first seemed.
But further experimentation proved that it's not the computer's fault
Here are the things I've tried to do in order to fix said problem:
-Reinstall game maker.
-Copy the healer and the bullet and destroy the previous ones.
-I've tried putting the piece of code in both the healer and the bullet.
-I've tried changing the collision event of the healer with the wall to say
instance_destroy()
(he's definitely touches the wall, and he's definitely not destroying itself).-I've tried changing the collision event of the bullet with the healer to say
instance_destroy()
(they're definitely passing through each other).-I've tried creating a new independent object and told it to get destroyed when ever it comes to contact with the healer (doesn't work).
Here's the code pieces:
THE BULLET:
Collision with wall:
instance_destroy()
Collision with the healer:
if(other.side != side)
{
other.life -= 1
instance_destroy()
}
(side refers to if their an enemy or a friend, side = 0 -> friend, side = 1 -> enemy)THE HEALER:
Collision with wall:
speed = 0
NOTE: The bullet is in fact on
side = 0
and the healer is in fact on side = 1
Thanks!
Last edited: