my cheaplittle watersplash effect
Moderator: InsideQC Admins
20 posts
• Page 1 of 2 • 1, 2
my cheaplittle watersplash effect
yep im trying to use the te_teleport effect for when you enter water..kinda so this is what i got
in client qc in playerpost think:
it compiles and wnt crash the server, but it splash :\
????
in client qc in playerpost think:
- Code: Select all
// check to see if player landed and play landing sound
if ((self.jump_flag < -300) && (self.flags & FL_ONGROUND) && (self.health > 0))
{
local vector org;
if (self.watertype == CONTENT_WATER)
{
sound (self, CHAN_BODY, "player/h2ojump.wav", 1, ATTN_NORM);
WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
WriteByte (MSG_BROADCAST, TE_TELEPORT);
WriteCoord (MSG_BROADCAST, org_x);
WriteCoord (MSG_BROADCAST, org_y);
WriteCoord (MSG_BROADCAST, org_z);
}
else if (self.jump_flag < -650)
......
it compiles and wnt crash the server, but it splash :\
????
bah
- MeTcHsteekle
- Posts: 399
- Joined: Thu May 15, 2008 10:46 pm
- Location: its a secret
Re: my cheaplittle watersplash effect
MeTcHsteekle wrote:yep im trying to use the te_teleport effect for when you enter water..kinda so this is what i got
in client qc in playerpost think:
- Code: Select all
// check to see if player landed and play landing sound
if ((self.jump_flag < -300) && (self.flags & FL_ONGROUND) && (self.health > 0))
{
local vector org;
if (self.watertype == CONTENT_WATER)
{
sound (self, CHAN_BODY, "player/h2ojump.wav", 1, ATTN_NORM);
WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
WriteByte (MSG_BROADCAST, TE_TELEPORT);
WriteCoord (MSG_BROADCAST, org_x);
WriteCoord (MSG_BROADCAST, org_y);
WriteCoord (MSG_BROADCAST, org_z);
}
else if (self.jump_flag < -650)
......
it compiles and wnt crash the server, but it splash :\
????
You really mean that this code will create water splash's without crashing the server?
Awesome!
- Team Xlink
- Posts: 368
- Joined: Thu Jun 25, 2009 4:45 am
- Location: Michigan
(self.flags & FL_ONGROUND)
your player is unlikely to be on the ground when entering in to water.
even if the pool is shallow.
your player is unlikely to be on the ground when entering in to water.
even if the pool is shallow.
- Spike
- Posts: 2892
- Joined: Fri Nov 05, 2004 3:12 am
- Location: UK
ah i see, thanks spike :O.
Team: no not yet, i tried to communicate that i had a problem, but didn't quite put it in writing correctly
Team: no not yet, i tried to communicate that i had a problem, but didn't quite put it in writing correctly
bah
- MeTcHsteekle
- Posts: 399
- Joined: Thu May 15, 2008 10:46 pm
- Location: its a secret
alright, i separtated it from te landing sound part
so now in playerpostthink in client qc i got this under it
and it still wont work
and for the lburn i made this lil shit in triggers.qc in hope to have the orange particle effect from the lighting gun.. i mean thunderbolt:
i think that s.think there might not be good, perhaps a sub_remove or something would be better?
any more thoughts, im trying to learn from mistakes :S
so now in playerpostthink in client qc i got this under it
and it still wont work
- Code: Select all
// cheack to see if player landed in water and make splash
if ((self.jump_flag < -300) && (self.flags & FL_INWATER) && (self.health > 0))
{
vector org;
if (self.watertype == CONTENT_WATER)
{
spawn_tfog (org);
}
else if (self.watertype == CONTENT_SLIME)
{
spawn_tfog (org);
}
else if (self.watertype == CONTENT_LAVA)
{
spawn_lburn (org);
}
and for the lburn i made this lil shit in triggers.qc in hope to have the orange particle effect from the lighting gun.. i mean thunderbolt:
- Code: Select all
void(vector org) spawn_lburn =
{
s = spawn ();
s.origin = org;
s.nextthink = time +0.2;
s.think = play_teleport;
WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
WriteByte (MSG_BROADCAST, TE_LIGHTNING2);
WriteCoord (MSG_BROADCAST, org_x);
WriteCoord (MSG_BROADCAST, org_y);
WriteCoord (MSG_BROADCAST, org_z);
};
i think that s.think there might not be good, perhaps a sub_remove or something would be better?
any more thoughts, im trying to learn from mistakes :S
bah
- MeTcHsteekle
- Posts: 399
- Joined: Thu May 15, 2008 10:46 pm
- Location: its a secret
alright update:
this works it a bit:
but it makes the teleport zing sounds somewhere, so i assume the particle effect is with it, just not on the player
the lava one just crashes the server ..with a bad sever message, whatevah that is
this works it a bit:
- Code: Select all
if (self.waterlevel == 1)
{
vector org;
but it makes the teleport zing sounds somewhere, so i assume the particle effect is with it, just not on the player
the lava one just crashes the server ..with a bad sever message, whatevah that is
bah
- MeTcHsteekle
- Posts: 399
- Joined: Thu May 15, 2008 10:46 pm
- Location: its a secret
hmm i think i made a step in the right direction, buit it still isn;t working
this is what i got in playerprethink this time:
all i can get is bright field for some reason, and i guess somehow ill neeed to make it only show up for a second
hmm.. i think removal will have to be worked in at playerpostthink???
this is what i got in playerprethink this time:
- Code: Select all
if ( !(self.flags & FL_INWATER) )
{
//player enter water effects
if (self.watertype == CONTENT_LAVA)
self.effects = self.effects + EF_BRIGHTFIELD;
else if (self.watertype == CONTENT_WATER)
self.effects = self.effects + TE_TELEPORT;
else if (self.watertype == CONTENT_SLIME)
self.effects = self.effects + TE_TELEPORT;
else
self.effects = self.effects;
// player enter water sound
if (self.watertype == CONTENT_LAVA)
sound (self, CHAN_BODY, "player/inlava.wav", 1.............................
all i can get is bright field for some reason, and i guess somehow ill neeed to make it only show up for a second
hmm.. i think removal will have to be worked in at playerpostthink???
bah
- MeTcHsteekle
- Posts: 399
- Joined: Thu May 15, 2008 10:46 pm
- Location: its a secret
First off, TE_LIGHTNING2 is not a particle effect, unless you use an engine that has it as a particle effect, but it still just a long beam and takes more input that just 1 origin, it takes an entitynum, a start origin and an end origin, hence why it crashed for you.
Secondly, you can not add TE_TELEPORT as an effect, its not an effect, its a temporary entity.
Secondly, you can not add TE_TELEPORT as an effect, its not an effect, its a temporary entity.
- Tomaz
- Posts: 67
- Joined: Fri Nov 05, 2004 8:21 pm
MauveBib wrote:The orange particle effect from lightning is just done using the particle() function, in the same way as blood.
iii AY MICARDO !!!
alright i got it going here with that
- Code: Select all
//player enter water effects
if (self.watertype == CONTENT_LAVA)
particle(self.origin,'0 0 0',222,30);
particle(self.origin,'0 0 5',221,30);
particle(self.origin,'0 0 5',220,30);
if (self.watertype == CONTENT_WATER)
particle(self.origin,'0 0 0',225,30);
particle(self.origin,'0 0 5',225,30);
particle(self.origin,'0 0 5',225,30);
if (self.watertype == CONTENT_SLIME)
particle(self.origin,'0 0 0',64,30);
particle(self.origin,'0 0 5',63,30);
particle(self.origin,'0 0 5',62,30);
but the issue stands now that even with the content things it only does orange particles
bah
- MeTcHsteekle
- Posts: 399
- Joined: Thu May 15, 2008 10:46 pm
- Location: its a secret
you need to bracket off the if statements:
- Code: Select all
//player enter water effects
if (self.watertype == CONTENT_LAVA)
{
particle(self.origin,'0 0 0',222,30);
particle(self.origin,'0 0 5',221,30);
particle(self.origin,'0 0 5',220,30);
}
if (self.watertype == CONTENT_WATER)
{
particle(self.origin,'0 0 0',225,30);
particle(self.origin,'0 0 5',225,30);
particle(self.origin,'0 0 5',225,30);
}
if (self.watertype == CONTENT_SLIME)
{
particle(self.origin,'0 0 0',64,30);
particle(self.origin,'0 0 5',63,30);
particle(self.origin,'0 0 5',62,30);
}
Apathy Now!
-

MauveBib - Posts: 634
- Joined: Thu Nov 04, 2004 1:22 am
20 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 1 guest