I've been rehashing whats already been done... spikes that stick into walls. Figured this would be a simple way to become accustomed to using "angles" and working with "think" functions.
The "think" part is puzzling me. I'm using the standard launch_spike function and have set newmis.touch = spike_touch2;
spike_touch2 is the function that sticks the spike to a wall... works great. I shoot, the spikes stick to the wall, then, starting with the first spike, they disappear one-by-one.
Just for fun, I moved newmis.think = SUB_Remove; and newmis.nextthink = time + 6; from launch_spike to spike_touch2.
What now happens is that after several spikes are fired the first two spikes do not remove themselves. Why does this happen?
Also, I've looked at other authors code that stick spikes to walls. In their code it appears that they remove the spike when it hits the wall, then spawn a new spike at the last location of the old spike, then orient the new spike so that it is stuck to the wall. Why spawn a new spike? Is this better to do for some reason?