Hi, I'm doing a pick-up-gun script now, but I have a problem with EntityCollided! This is a snip of my code:
const type_camera=1,type_weapon=2
...
entitytype camera,type_camera
entitytype weapon,type_weapon
...
while not keydown(-1)
...
if entitycollided(camera,type_weapon)<>0 then
runtimeerror "Camera and weapon collided!"
endif
...
wend
That runtimeerror is only temporarily, so I can know when the camera hits the weapon (never). If some reason it never hits the weapon. The game is first person, and the camera radius is 6. When I run over the weapon, I don't get the runtimeerror saying that it collided. What can be wrong?
const type_camera=1,type_weapon=2
...
entitytype camera,type_camera
entitytype weapon,type_weapon
...
while not keydown(-1)
...
if entitycollided(camera,type_weapon)<>0 then
runtimeerror "Camera and weapon collided!"
endif
...
wend
That runtimeerror is only temporarily, so I can know when the camera hits the weapon (never). If some reason it never hits the weapon. The game is first person, and the camera radius is 6. When I run over the weapon, I don't get the runtimeerror saying that it collided. What can be wrong?