(Old code tutorial) Guards bleed when shot (easier and less memory draining) from Wolf Planet forum

View previous topic View next topic Go down

(Old code tutorial) Guards bleed when shot (easier and less memory draining) from Wolf Planet forum

Post by Officer-M. John (Admin) on Thu Dec 01, 2016 12:16 pm

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:

Code:

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...

Writte by Deathshead on Sat Feb 26, 2005 5:21 am
avatar
Officer-M. John (Admin)
Admin

Posts : 328
Join date : 2015-10-02
Age : 19

View user profile http://wolf3dfanboys.usersboard.com

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum