 |
Wolf Planet We want you here!
|
| View previous topic :: View next topic |
| Author |
Message |
Deathshead Corporal

Joined: 18 Feb 2005 Posts: 87
|
Posted: Sat Feb 26, 2005 5:21 am Post subject: 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:
| 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... _________________ Myspace
VampireFreaks
Music4Life
Wolfing Time |
|
| Back to top |
|
 |
Conner94 Moderator

Joined: 15 Jan 2005 Posts: 249 Location: ???
|
Posted: Mon Jul 18, 2005 1:31 am Post subject: Re: Guards bleed when shot (easier and less memory draining) |
|
|
| Deathshead wrote: |
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:
| Code: |
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  _________________ My Wolfenstein Website:
http://www.wolf94.cjb.net
Status: Falling apart over a product I ordered that is taking forever to arrive. |
|
| Back to top |
|
 |
Conner94 Moderator

Joined: 15 Jan 2005 Posts: 249 Location: ???
|
Posted: Mon Jul 18, 2005 1:55 am Post subject: |
|
|
I found a bug
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? _________________ My Wolfenstein Website:
http://www.wolf94.cjb.net
Status: Falling apart over a product I ordered that is taking forever to arrive. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|