Raised This Month: $ Target: $400
 0% 

Blood effect/beam ... [UNANSWERED]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Davidos
Senior Member
Join Date: Feb 2005
Old 02-20-2007 , 12:12   Blood effect/beam ... [UNANSWERED]
Reply With Quote #1

Is it possible to send some kind of blood stream/beam <'urinate' mod anyone?>

from one player to another? I need it for the vampire mod I am building -_-

UPDATE

I just got a mail from the server host, either I release this plug for his server or he is scrapping the idea...

Last edited by Davidos; 03-04-2007 at 09:36.
Davidos is offline
SAMURAI16
BANNED
Join Date: Sep 2006
Old 02-20-2007 , 14:01   Re: Blood effect/beam ...
Reply With Quote #2

you can use TE_BLOODSTREAM
Code:
#define    TE_BLOODSTREAM  101            
 write_byte(TE_BLOODSTREAM)
 write_coord(position.x)
 write_coord(position.y)
 write_coord(position.z)
 write_coord(vector.x)
 write_coord(vector.y)
 write_coord(vector.z)
 write_byte(color)
 write_byte(speed)
If you want to send blood from an person to another just take a look on AMX Piss plugin and change from that yellow stream in a blood effects
SAMURAI16 is offline
Send a message via MSN to SAMURAI16
Davidos
Senior Member
Join Date: Feb 2005
Old 02-20-2007 , 14:12   Re: Blood effect/beam ...
Reply With Quote #3

Quote:
Originally Posted by SAMURAI16 View Post
you can use TE_BLOODSTREAM
Code:
#define    TE_BLOODSTREAM  101            
 write_byte(TE_BLOODSTREAM)
 write_coord(position.x)
 write_coord(position.y)
 write_coord(position.z)
 write_coord(vector.x)
 write_coord(vector.y)
 write_coord(vector.z)
 write_byte(color)
 write_byte(speed)
If you want to send blood from an person to another just take a look on AMX Piss plugin and change from that yellow stream in a blood effects
But the problem is, piss goes to where the user aims at... but not to a player itself...

Code:
public sqrt(num) {     new div = num     new result = 1     while (div > result) {         div = (div + result) / 2         result = num / div     }     return div } public make_blood(ids[]) {     new id=ids[0]     new vec[3]     new aimvec[3]     new velocityvec[3]     new length     get_user_origin(id,vec)     get_user_origin(id,aimvec,3)     new distance = get_distance(vec,aimvec)     new speed = floatround(distance*1.9)         velocityvec[0]=aimvec[0]-vec[0]     velocityvec[1]=aimvec[1]-vec[1]     velocityvec[2]=aimvec[2]-vec[2]         length=sqrt(velocityvec[0]*velocityvec[0]+velocityvec[1]*velocityvec[1]+velocityvec[2]*velocityvec[2])         velocityvec[0]=velocityvec[0]*speed/length     velocityvec[1]=velocityvec[1]*speed/length     velocityvec[2]=velocityvec[2]*speed/length     message_begin(MSG_BROADCAST,SVC_TEMPENTITY)     write_byte(101)     write_coord(vec[0])     write_coord(vec[1])     write_coord(vec[2])     write_coord(velocityvec[0])     write_coord(velocityvec[1])     write_coord(velocityvec[2])     write_byte(225) // color     write_byte(160) // speed     message_end() }

this is from the piss code, but then I modded the color and the name XD, I took out the case stuff as well, seeing you don't need to set up the style...

So how do I edit that in there?


Cuz somtin tells me THIS doesn't work

Code:
public make_blood(ids[]) {     new id=vec1[3]     new target=vec2[3]     message_begin(MSG_BROADCAST,SVC_TEMPENTITY)     write_byte(101)     write_coord(vec1[0])     write_coord(vec1[1])     write_coord(vec1[2])     write_coord(vec2[0])     write_coord(vec2[1])     write_coord(vec2[2])     write_byte(225) // color     write_byte(160) // speed     message_end() }

Last edited by Davidos; 02-20-2007 at 18:03.
Davidos is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 02-20-2007 , 19:36   Re: Blood effect/beam ... [URGENT]
Reply With Quote #4

Try this out.

Code:
 new beamSpr;  public plugin_precache()  {     beamSpr = precache_model("sprites/lgtning.spr");  }  public make_blood_beam(from,to)  {     message_begin(MSG_ALL,SVC_TEMPENTITY);     write_byte(TE_BEAMENTS);     write_short(from); // start entity     write_short(to); // end entity     write_short(beamSpr); // sprite index     write_byte(0); // start frame     write_byte(30); // frame rate in 0.1's     write_byte(20); // life in 0.1's     write_byte(25); // line width in 0.1's     write_byte(50); // noise amplititude in 0.01's     write_byte(200); // red     write_byte(10); // green     write_byte(10); // blue     write_byte(100); // brightness     write_byte(50); // scroll speed in 0.1's     message_end();  }
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Davidos
Senior Member
Join Date: Feb 2005
Old 02-21-2007 , 05:28   Re: Blood effect/beam ... [URGENT]
Reply With Quote #5

Quote:
Originally Posted by XxAvalanchexX View Post
Try this out.

Code:
 new beamSpr;  public plugin_precache()  {     beamSpr = precache_model("sprites/lgtning.spr");  }  public make_blood_beam(from,to)  {     message_begin(MSG_ALL,SVC_TEMPENTITY);     write_byte(TE_BEAMENTS);     write_short(from); // start entity     write_short(to); // end entity     write_short(beamSpr); // sprite index     write_byte(0); // start frame     write_byte(30); // frame rate in 0.1's     write_byte(20); // life in 0.1's     write_byte(25); // line width in 0.1's     write_byte(50); // noise amplititude in 0.01's     write_byte(200); // red     write_byte(10); // green     write_byte(10); // blue     write_byte(100); // brightness     write_byte(50); // scroll speed in 0.1's     message_end();  }
Now it's asking what code beaments is -_-

I put it on 8... that's right, right?

Anyway now the lightning is shooting up XD`

Edit: I just addded 106 <Piss code>

Code:
No model 25610!
Host_Error: UserMsg: Not Present on Client 19
No go...



EDIT!

BOOYAH! I got it to go, only one problem... the beam starts at the... lower... parts...

And, there is really... no way to make this work with blood stream huh... <101>

Last edited by Davidos; 02-21-2007 at 11:50.
Davidos is offline
Davidos
Senior Member
Join Date: Feb 2005
Old 02-21-2007 , 11:57   Re: Blood effect/beam ... [URGENT]
Reply With Quote #6

Sorry for the mega double post but the guy hosting the serv says that I have just one more day before he cuts me off!

All that works but:

The beam comes from the crotch
I don't think he likes it when the beam flashes that fast <it looks like it sucks 31 gallons of blood O_o>

I would really appreciate it if this could be able in ent type 101 <blood stream>
Davidos is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 02-21-2007 , 13:20   Re: Blood effect/beam ... [URGENT]
Reply With Quote #7

TE_BEAMPOINTS with another sprite and get users origin and add some height.
[ --<-@ ] Black Rose is offline
Davidos
Senior Member
Join Date: Feb 2005
Old 02-21-2007 , 17:11   Re: Blood effect/beam ... [URGENT]
Reply With Quote #8

Quote:
Originally Posted by [ --<-@ ] Black Rose View Post
TE_BEAMPOINTS with another sprite and get users origin and add some height.
... uh, how do you expect me to know how to do that... *sniff*

I don't have the slightest idea how to code, the only thing I'm good at coding is just learning from other scripts. So unless you have an example to back it up that's pretty much a useless post for me -_-;

Lemme try to explain.

Beampoints
Code:
/* Temp entity message types for message_begin() */ #define TE_BEAMPOINTS               0        // Beam effect between two points // write_byte(TE_BEAMPOINTS) // write_coord(startposition.x) // write_coord(startposition.y) // write_coord(startposition.z) // write_coord(endposition.x) // write_coord(endposition.y) // write_coord(endposition.z) // write_short(sprite index) // write_byte(starting frame) // write_byte(frame rate in 0.1's) // write_byte(life in 0.1's) // write_byte(line width in 0.1's) // write_byte(noise amplitude in 0.01's) // write_byte(red) // write_byte(green) // write_byte(blue) // write_byte(brightness) // write_byte(scroll speed in 0.1's)


Bloodstream 101
Code:
#define TE_BLOODSTREAM              101      // Particle spray // write_byte(TE_BLOODSTREAM) // write_coord(position.x) // write_coord(position.y) // write_coord(position.z) // write_coord(vector.x) // write_coord(vector.y) // write_coord(vector.z) // write_byte(color) // write_byte(speed)

HOW do I bind these to a player and it's target... <And I mean a diffrent player as in target...>

Because I have tried id[] and target[]
with id[3] and target[3] from id[0/2] and target[0/2] and that didn't do anything...

Last edited by Davidos; 02-21-2007 at 17:58.
Davidos is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 02-21-2007 , 23:41   Re: Blood effect/beam ... [URGENT]
Reply With Quote #9

For TE_BEAMPOINTS:

Code:
new from_origin[3], to_origin[3]; get_user_origin(from,from_origin); get_user_origin(to,to_origin); from_origin[2] += 16.0; // raised to_origin[2] += 16.0; // raised // ... write_coord(from_origin[0]); write_coord(from_origin[1]); write_coord(from_origin[2]); write_coord(to_origin[0]); write_coord(to_origin[1]); write_coord(to_origin[2]); // ...

If you want to change how it appears, I commented what each of the write_* things are for, so just change the values until you find what you (or your boss guy) likes.

TE_BLOODSTREAM is a little bit more complicated. Try this.

Code:
new iStart[3], Float:fStart[3], iEnd[3], Float:fEnd[3] Float:fVelocity[3]; get_user_origin(from,iStart); get_user_origin(to,iEnd); iStart[2] += 16.0; // raise iEnd[2] += 16.0; // raise IVecFVec(iStart,fStart); IVecFVec(iEnd,fEnd); get_speed_vector(fStart,fEnd,512.0,fVelocity); // 512.0 is the speed // ... write_coord(iStart[0]); write_coord(iStart[1]); write_coord(iStart[2]); write_coord(floatround(fVelocity[0])); write_coord(floatround(fVelocity[1])); write_coord(floatround(fVelocity[2])); // ...

Note that get_speed_vector is a function from GHW_Chronic's CHR Engine.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Old 02-22-2007, 04:11
Davidos
This message has been deleted by Davidos. Reason: RRRIP!
Reply


Thread Tools
Display Modes

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 00:44.


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