Wolf Planet Forum Index Wolf Planet
We want you here!
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Guards bleed when shot (easier and less memory draining)

 
Post new topic   Reply to topic    Wolf Planet Forum Index -> Coding Alliance
View previous topic :: View next topic  
Author Message
Deathshead
Corporal


Joined: 18 Feb 2005
Posts: 87

PostPosted: Sat Feb 26, 2005 5:21 am    Post subject: Guards bleed when shot (easier and less memory draining) Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
Conner94
Moderator


Joined: 15 Jan 2005
Posts: 249
Location: ???

PostPosted: Mon Jul 18, 2005 1:31 am    Post subject: Re: Guards bleed when shot (easier and less memory draining) Reply with quote

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 Wink
_________________
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
View user's profile Send private message Visit poster's website
Conner94
Moderator


Joined: 15 Jan 2005
Posts: 249
Location: ???

PostPosted: Mon Jul 18, 2005 1:55 am    Post subject: Reply with quote

I found a bug Laughing

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Wolf Planet Forum Index -> Coding Alliance All times are GMT
Page 1 of 1

Jump to:  

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


Powered by phpBB © 2001 phpBB Group

Chronicles phpBB2 theme by Jakob Persson (http://www.eddingschronicles.com). Stone textures by Patty Herford.