jorotroid
Member
dale_coop said:Oh nice result, yeah <3
How did you do that?
his arm is not the "weapon player"?
It is a player weapon, but I found that simply removing the DeactivateCurrentObject that normally removes a player weapon when it hits a monster will result in an infinite loop that will freeze the game. The problem is that when the object doesn't get activated, it ends up getting checked for collision again, then again, and then forever. I tried many ideas for dealing with this, but a most of them failed because I didn't complete understand everything that was happening yet. What I ended up doing is instead of deactivating the object, I turned off the flag that marks the object as a player weapon. I found out that the data that says what flags should be applied to which type of object is protected in a look up table under ObjectFlags,(Object_type). When the object gets created, the that value gets copied over to Object_flags,(object's reference). So in other words, I can turn off the flag in Object_flags for the current instance of the arm object, then the arm object will die on its own, then when a new arm is created it will get the propper flag settings from ObjectFlags. That first arm will never hit again, but it doesn't live long enough to get the chance anyway. I hope that all made sense. My brain is now mush.
EDIT: Oh, one thing I forgot to mention. The object collision routine uses ObjectFlags for some reason to check the collision, so I had to changed that to Object_flags.