Raised This Month: $ Target: $400
 0% 

Detecting func_breakable destruction. & Create breakable func_pushable.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
solidsnake
Member
Join Date: Jul 2006
Old 10-14-2006 , 05:44   Detecting func_breakable destruction. & Create breakable func_pushable.
Reply With Quote #1

Dears friends : i have some trouble about detecting func_breakable destruction.

I want to do this :

When a player is breaking a windows (or other func_breakable), it trigger a event (function).

Currently i use a loop task that checking func_breakable health and start a function if under 0.Work fine, But server laaaaaaggg (task set to 0.3s).

Other request how to doing a func_pushable that a player can break ? (like sit in cs_estate)

Thank you !
solidsnake is offline
solidsnake
Member
Join Date: Jul 2006
Old 10-14-2006 , 12:01   Re: Detecting func_breakable destruction. & Create breakable func_pushable.
Reply With Quote #2

No body can help me ?
solidsnake is offline
commonbullet
Veteran Member
Join Date: Oct 2005
Old 10-14-2006 , 14:38   Re: Detecting func_breakable destruction. & Create breakable func_pushable.
Reply With Quote #3

Post your 'loop code';
To make func_pushable breakable, set spawnflags to 128 (I'm not sure if you'll have to respawn this entity in each round).
commonbullet is offline
Send a message via ICQ to commonbullet Send a message via MSN to commonbullet
solidsnake
Member
Join Date: Jul 2006
Old 10-15-2006 , 11:09   Re: Detecting func_breakable destruction. & Create breakable func_pushable.
Reply With Quote #4

Nice work fine !!! Thx !

But how to block "Enter key", to avoid push bug (fast speed on the map for the player and object ?) :p
solidsnake is offline
solidsnake
Member
Join Date: Jul 2006
Old 10-17-2006 , 04:01   Re: Detecting func_breakable destruction. & Create breakable func_pushable.
Reply With Quote #5

Hello

No issue for my problem ?
solidsnake is offline
Rolnaaba
Veteran Member
Join Date: May 2006
Old 10-17-2006 , 11:17   Re: Detecting func_breakable destruction. & Create breakable func_pushable.
Reply With Quote #6

couple things:
1) post your whole code like was asked already
2) stop double posting and bumping your code that makes people not want to help you
3)JUST WAIT
__________________
DO NOT PM me about avp mod.
Rolnaaba is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 10-17-2006 , 15:07   Re: Detecting func_breakable destruction. & Create breakable func_pushable.
Reply With Quote #7

Code:
#include <engine> public plugin_init() {      register_think("func_breakable","think_breakable"); } public think_breakable(ent) {      if(entity_get_float(ent,EV_FL_health) <= 0.0)      {           // dead      } }

As far as I know, registering a think doesn't lag the server very much if at all. And of course if you don't want to use the evil, despicable, dreaded, hellspawn, engine module (or at least that's what everyone else thinks), I can show you how to do this with Fakemeta as well.

As for actual functionality, hopefully a think gets called when the breakable is at or below 0.0 HP. In fact, I think a special one is called when it dies, so this should work.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
solidsnake
Member
Join Date: Jul 2006
Old 10-18-2006 , 05:24   Re: Detecting func_breakable destruction. & Create breakable func_pushable.
Reply With Quote #8

XxAvalanchexX, i love you lol

Karma for you !!!!

Edit : Why FakeMeta is better than Engine ?

Last edited by solidsnake; 10-18-2006 at 05:29.
solidsnake is offline
P34nut
AMX Mod X Beta Tester
Join Date: Feb 2006
Location: Netherlands
Old 10-18-2006 , 09:12   Re: Detecting func_breakable destruction. & Create breakable func_pushable.
Reply With Quote #9

func_breakables use as overridden takedamage..

temporary entity 108 (TE_BREAKMODEL) is only used when a breakable "died"

maybe you can do something with this info

btw i found this in HLSDK (dlls/func_break.cpp)

XxAvalanchexX his way should work to
__________________
All you need to change the world is one good lie and a river of blood
P34nut is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 10-18-2006 , 12:05   Re: Detecting func_breakable destruction. & Create breakable func_pushable.
Reply With Quote #10

Quote:
Originally Posted by solidsnake View Post
XxAvalanchexX, i love you lol

Karma for you !!!!

Edit : Why FakeMeta is better than Engine ?
It's just more efficente, more power, etc. You don't really need to worry about it if you're begining since the engine is just fine. Fakemeta is typically for coders who want to have "better" code (in terms of power and efficency).
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
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 04:53.


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