Guards bleed when shot (easier and less memory draining) I know I already posted a tutorial for this, but I have found a much easier method that takes less memory. It is done with just one if statement at the end of the DamageActor function in WL_STATE.C:
if (ob->obclass != mechahitlerobj)
SpawnStatic (tilex,tiley,SPR_STAT_36);
So, All enemies and bosses will bleed when shot, except for Mecha Hitler, as he in in a metal suit.
This, as you will see, is much better than my earlier version.
There you go
-Deathshead
EDIT: DAMNIT! There goes what credibility I had. You still have to add the variables I add in the last tutorial, but you use this one statement instead of all the PlaceItem things. Thinking about it now, you could probably just put the PlaceItem thing in the same spot as this...
Conner94- 07-17-2005
Re: Guards bleed when shot (easier and less memory draining) EDIT: DAMNIT! There goes what credibility I had. You still have to add the variables I add in the last tutorial, but you use this one statement instead of all the PlaceItem things. Thinking about it now, you could probably just put the PlaceItem thing in the same spot as this...
Actually, you don't need anymore variables. Just change it to this instead:
if (ob->obclass != mechahitlerobj)
SpawnStatic (ob->tilex,ob->tiley,SPR_STAT_36);
It uses 'ob->tilex/y'. Knowing this, many more things could be done simpler. Gee, I am starting to get good at this :wink:
Conner94- 07-17-2005
I found a bug :lol:
This may be because I also have blood splats, but I don't think so considering that they dissapear. If too many puddles (not splats) are placed, then things on the screen begin to disapear. This is a problem with bosses. So, I will see if I can solve it, but meanwhile, how would it check the tile and not place one if their is one their?
Forumer™ is Voted #1 Free Forum Hosting provider
Build your own community today with the largest message board hosting company.