Raised This Month: $ Target: $400
 0% 

Back to work...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BioHazardousWaste
Senior Member
Join Date: Apr 2005
Location: Ontario, Canada =)
Old 09-12-2005 , 02:23   Back to work...
Reply With Quote #1

Hey guys,

I've been a way for a while, but now i'm out of summer school, and i'm back from vacation. It's back to work on the new Matrix Mod for me. I tackled those mines again with a buddy of mine tonight, and got them pretty much finished. Only problem is I want to be able to shoot them and have them blow up. So I used this code:

Code:
//creation
entity_set_float(entity,EV_FL_takedamage,1.0)
entity_set_float(entity,EV_FL_health,50.0) 

//check hp
new float:ENTHP = entity_get_float(entity, EV_FL_health)
client_print (0, print_console, "Mine HP = %f", ENTHP)//debug print
if (ENTHP <= 0.0)
	BOOM = true
Boom is a boolean that when true the mine explodes. Obviously the mine is an entity. Everything works fine, except according to my console the mine doesn't take damage. It stays at 50.0000 hp no matter how many clips I put into it; and of course it doesn't explode. Anyone know what the problem is?

P.S. I'm loving my kara.. plz give me a bit I shouldn't be fucked over for going to summer school and going on vacation.

EDIT:
OK, let's take this a bit further, seems how it's for the new matrix mod, i'm toying with the idea of a minesweeper. How would I go about doing that? I could easily do it if it was a person using get_user_aiming, but it wont return entities will it? Basically I just need to know when someone is aiming at the entity, and which entity it is, then I can take it from there. Not sure how I would go about doing that though. Anybody give me a hand? Thanx
__________________
"What then is truth? Truths are illusions which we have forgotten are illusions - they are metaphors that have become worn out... this (truth) is the duty to lie according to a fixed convention.

-Friedrich Nietzsche
BioHazardousWaste is offline
Send a message via MSN to BioHazardousWaste
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 09-12-2005 , 17:58  
Reply With Quote #2

Try these two things:

a) Create the mine entity as a func_breakable and then change it's classname to whatever so that it knows it really should take damage.

b) Set it's max_health to 50.0 first and then it's current health to 50.0
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
BioHazardousWaste
Senior Member
Join Date: Apr 2005
Location: Ontario, Canada =)
Old 09-13-2005 , 18:52  
Reply With Quote #3

that didn't seem to make a difference, same thing as before

EDIT:

Thanx for the karma
__________________
"What then is truth? Truths are illusions which we have forgotten are illusions - they are metaphors that have become worn out... this (truth) is the duty to lie according to a fixed convention.

-Friedrich Nietzsche
BioHazardousWaste is offline
Send a message via MSN to BioHazardousWaste
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 09-13-2005 , 20:29  
Reply With Quote #4

Quote:
Originally Posted by BioHazardousWaste
Thanx for the karma
What?
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
BioHazardousWaste
Senior Member
Join Date: Apr 2005
Location: Ontario, Canada =)
Old 09-13-2005 , 21:20  
Reply With Quote #5

lol someone must have given me karma cuz i was at -1 yesterday. But um... on to the point, anybody have another idea why it won't take damage?

EDIT:

So noone knows? None of you know how to make an entity take damage. WTF? It can't be hard, please give me a hand.
__________________
"What then is truth? Truths are illusions which we have forgotten are illusions - they are metaphors that have become worn out... this (truth) is the duty to lie according to a fixed convention.

-Friedrich Nietzsche
BioHazardousWaste is offline
Send a message via MSN to BioHazardousWaste
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 14:32.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode