Im just gonna say it…WHAT the HECK are raysensors? please tell me how 2 use them in me game.
ive never gotten it to do anything
and ive never gotten any of these to work either
the radar and near and the touch sensor
maby im doing something wrong
other wise i probably would be able to tell you what the ray sensor does
A ray sensor casts an invisible “laser”, like from a laser pointer. It cannot go through walls. The ray sensor trips positive when the laser dot hits the property you set.
ray sensors will send out an invisible “line” in the direction that you specify( +x,+y,-x,-y etc.) You can also specify the distance that this “line” or ray will travel. heres how its useful…
say you wanted a box to disappear only if another box moves in front of it…
you would hook up a ray sensor to it and connect that to an edit object acuator blah blah…
but its for sensing things in a straight line in one direction
heres an example:
heres the sensor for it:
now you would put a material or property in there for the object you want to detect.
after that you just connect it to a controller and an actuator.
ok so how would i use this to imitate a gun shooting. using an actual object is much too slow.
i would just parent an empty to the gun and place it at the end of the barrel. then have the ray come from that empty. have the ray sensor coupled to a mouse sensor. connect that to a message actuator so that when the ray hits the enemy it will send out a message.
for the enemy, have a message sensor to tell it when its been hit, and the actuator of your choice.
your going to have to use python to get exactly what you want. because if you have many enemies your going to have to have a seperate ray sensor for each one with seperate messages or every enemy will die when you hit just one.
interesting…
and way too complicated for me
the most impressive fact is that it RUNS SUPER GOOD, i guesse it might be the ray sensor/python script used for shooting instead of adding real bullets.
lizard809, could you help me out with the python script part or at least tell me where to learn. also your game link for download won’t work