AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Do things with water.. (https://forums.alliedmods.net/showthread.php?t=56187)

[X]-RayCat 06-08-2007 10:04

Do things with water..
 
Is there way to aim and set water area to trigger hurt?

VEN 06-08-2007 12:28

Re: Do things with water..
 
Yes if water has a box form.

[X]-RayCat 06-08-2007 16:55

Re: Do things with water..
 
Quote:

Originally Posted by VEN (Post 487042)
Yes if water has a box form.

How many waters have box form? And which water does have?

Drak 06-08-2007 17:15

Re: Do things with water..
 
Quote:

Originally Posted by VEN (Post 487042)
Yes if water has a box form.

Doesn't this mean if the mapper used func_water, instead of func_illusionary?

regalis 06-08-2007 17:16

Re: Do things with water..
 
depends on the map you are on...
dont know how to retrieve the form of an object...0o
That seems to be a hard one.

greetz regalis

[X]-RayCat 06-09-2007 16:15

Re: Do things with water..
 
Just to clear you. I tried to make plugin by aiming func_water and set trigger_hurt. It didnt work ofc..

VEN 06-10-2007 01:19

Re: Do things with water..
 
Something like this should work:
Code:
#include <amxmodx> #include <fakemeta_util> public plugin_init() {         register_concmd("tst", "func") } public func(id) {         static Float:v[3]         fm_get_aim_origin(id, v)         new ent = FM_NULLENT         static const func_water[] = "func_water"         while ((ent = fm_find_ent_in_sphere(ent, v, 0.0))) {                 if (fm_is_ent_classname(ent, func_water)) {                         static Float:v2[3]                         pev(ent, pev_absmin, v)                         pev(ent, pev_absmax, v2)                         ent = fm_create_entity("trigger_hurt")                         set_pev(ent, pev_dmg, 2.0)                         fm_DispatchSpawn(ent)                         fm_entity_set_size(ent, v, v2)                         return PLUGIN_HANDLED                 }         }         return PLUGIN_HANDLED }

[X]-RayCat 06-10-2007 12:04

Re: Do things with water..
 
Thanks VEN. Is it possible to remove trigger_hurt? How many health will you loose whit:
Code:

  set_pev(ent, pev_dmg, 2.0)

regalis 06-10-2007 12:18

Re: Do things with water..
 
engfunc(EngFunc_RemoveEntity, ent)

I don't know exactly but i think this would be 2 HP damage per second.
Because in kz plugins there are -15.0 and you got 15 HP per second back..i think..0o

greetz regalis

VEN 06-11-2007 09:20

Re: Do things with water..
 
Quote:

How many health will you loose whit:

Code:
set_pev(ent, pev_dmg, 2.0)
1.0 hp per half of second


All times are GMT -4. The time now is 10:44.

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