Been thinking about it and, could it be that after the entity is created
the new settings (to turn visible and stop following player) are
simply not added to the entity..
so basically I can't change the existing entity(at least not after
weapon creation)
sooo is there anyway I can pass on
Well, took a bit of a more carefull approach and think the most
important part is ready.
Now the harder part I don't really know if I'm doing it right.
Well first up my events look like this now:
case EVENT_WEAPON_SEQUENCE_FINISHED:
m_fDrawbackFinished = true;
nevermind the first, I was to hung up on trying to do it the grenade
entity that I forgot I could do it in the weapon file but it still
doesn't work though.
Tried the following in the functions for throwing, rolling, etc:
if ( !fThrewGrenade )
{
Those functions should both work just fine. May I suggest: Use the debugger
and figure it out?
--
Jorge Vino Rodriguez
___
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
debugger is this?:
http://developer.valvesoftware.com/wiki/Installing_and_Debugging_the_Source_Code
if so that doesn't help lol o.0
anyone willing to take a peek at the code?
Jorge Rodriguez wrote:
Those functions should both work just fine. May I suggest: Use the debugger
and figure it out?
Hmmm I'm a bit stuck, I tried something out and I think it can work but
I don't know if I'm doing it right.
In the weapon file there's a bool in the area of the events used to
determine if the grenade was thrown, I moved it's declaration on top of
the file along with the rest of the variables
Hey list,
well I think I got the part of checking if it's thrown in the entity
now, but I still don't know how to create the entity before hand while
still being able to different throws.
I tried a rather dumb approach of using a switch that failed horribly,
so I was wondering if anyone had
Programming
Subject: Re: [hlcoders] Passing sound from player to grenade entity?
Hey list,
well I think I got the part of checking if it's thrown in the entity
now, but I still don't know how to create the entity before hand while
still being able to different throws.
I tried a rather dumb approach
going to do
with the thing.
-Tony
-Original Message-
From: Tony Sergi
Sent: Wednesday, October 29, 2008 1:43 PM
To: 'Discussion of Half-Life Programming'
Subject: RE: [hlcoders] Passing sound from player to grenade entity?
It's really simple. Modify the throw function that's
Been at it for about a day and I can't really find a way to check for if
the grenade is thrown or not and changing between the entity following
the player or been thrown away.
I can do one or the other, I can also do it by having it create but
that's not what I want.
The velocity is defined in
Create a new function / variable and set that when it is thrown, so in
your checks just check whether that is set or not?
Maybe SetThrown and a variable bool m_bThrown;
Yorg Kuijs wrote:
Been at it for about a day and I can't really find a way to check for if
the grenade is thrown or not
Better yet, create a Throw() function in the grenade class to remove the
entity following, set m_bThrown, turn the entity visible, turn on the pretty
lights, notify the aliens, fasten the seatbelts, seal all entrances and
exits, close all shops in the mall, cancel the three ring circus, secure all
That's what I meant to do, I'm not to great at explaining things :P
Tom Leighton wrote:
Could you not create your grenade, spawn it, but not render it and keep
it parented to the player until thrown?
(Another of Tom's bad ideas...)
___
To
So been at it for a while and I have no idea how to parent it to the
player, are there any examples of entities parenting to a player like this?
Can't find anything about parenting on entities besides doing it for
maps, nothing for coding though.
___
Normally what's used is what's called a bone merge, but something like that
isn't really necessary in this case. Probably the easiest way is to have in
the grenade's think function it call
SetAbsOrigin(GetOwner()-WorldSpaceCenter()); every frame until it is
thrown.
--
Jorge Vino Rodriguez
That can be done through events right?
Well will try it sometime soon and find out I guess
Jorge Rodriguez wrote:
Normally what's used is what's called a bone merge, but something like that
isn't really necessary in this case. Probably the easiest way is to have in
the grenade's think function
Events? Animation events? No, I wouldn't think so.
--
Jorge Vino Rodriguez
___
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders
ok so how do I make it do that with frames then?
Only worked with animation events to do things based on frames.
Jorge Rodriguez wrote:
Events? Animation events? No, I wouldn't think so.
___
To unsubscribe, edit your list preferences, or view the
Animation frames and simulation frames are different, I was talking
simulation frames. An entity's think function gets called ten times a
second. Not quite every simulation frame, but you know, whatever. Anyway all
of that is moot, what I was trying to say is, put something like this in
your
Hey list,
stumbled on 2 annoying problems, my grenade timer starts from the
viewmodel and as such the sounds that go along with it must be started
along with it. I've turned the sound into a single .wav, for another
grenade goes the same but that one has a countdown sound that can't be
simple
As I was reading your problem, that's the solution that came into my head at
first. It's totally possible, it might require some leg work for a
non-veteran, but it's not something out of the ordinary.
--
Jorge Vino Rodriguez
___
To unsubscribe, edit
Why not do what the HL2 Grenade does?
Create the sound with the grenade entity, so that when you create a new
one and then spawn it, it will start the sound. The sound will then
travel with the entity.
Jorge Rodriguez wrote:
As I was reading your problem, that's the solution that came into my
No, Tom it wouldn't, the entity is created when thrown but the timer
starts when the pin is pulled, in the meantime you can still hold a
grenade until it blows, if you would release it late then the sound
starts when it already explodes. But like you said, starting the sound
with the entity is
Could you not create your grenade, spawn it, but not render it and keep
it parented to the player until thrown?
(Another of Tom's bad ideas...)
Yorg Kuijs wrote:
No, Tom it wouldn't, the entity is created when thrown but the timer
starts when the pin is pulled, in the meantime you can still
Just create a sound instance and pass it onto the new ent once its thrown.
The fast zombies use them for example. I am pretty sure its the only way to
keep a control pointer to a sound on the engine.
On Sun, Oct 26, 2008 at 1:30 PM, Tom Leighton
[EMAIL PROTECTED]wrote:
Could you not create your
25 matches
Mail list logo