Hi Matthew, that's exactly how I've defined this entity; I've spawned it
and then assigned it to the player's field, but am having trouble with it
not behaving right. <smile> When I left it on it's own, and just assigned
it as being owned by the player, but not in the player's field, it spawned
in the correct place but then didn't move with the player. Now that I've
assigned it as being owned by the player and also assigned it to a field of
the player it spawns, but in the wrong place, and again, doesn't move.
I'm thinking that using the setorigin function might be the only way to
do what I want, but am still not sure. I'd like to have it always be in
the right place in relation to the player, but I'm thinking that just using
the setorigin function with a nextthink of time might work without being
choppy.
What I'm trying to simulate is the player carrying something; actually,
a light saber to be more specific, so it will always be in one position
unless it's being used, in which case it relocates itself across in front
of the player and takes a similar position then, on the player's opposite
side, as if it were swung in front of them. Does this make sense? So I
need to have two relative points where it can live in relation to the
player. Each of these points moves with the player, so they have the sense
that they're holding the light saber on either their left or right, and
when they swing, it passes in front of them and then takes it's position
again at their other side until they swing again and it moves back to where
it was.
I have it making the proper sounds at this point, at least in it's first
stages, so now I just need to get it moving correctly.
The business of working with entities, seems to be a little convoluted
to me, do you have any specific tips that you think might help me
out? I've been looking at some tutorials but its not quite making complete
sense to me and completely clicking yet. <smile>
Anyway, thanks so much for the note. Any thoughts or ideas you or
anyone else may have would as always, be greatly appreciated.
Have a wonderful weekend!...
Smiles,
Mod Girl
At 11:54 PM 4/28/2006 +0100, you wrote:
How often is the entity thinking?
Does it have to *always* be in the right place or is there a margin for
slackness?
The solution could be as simple as the entity working out, whenever it
thinks, where it's owner is and where it should be and setting its
origin to that point (if the answer to the above two questions would
enable that to be acceptable).
How do you work out which player owns the entity? We use the technique
of spawning something and assigning it to a field of the player's entity
so we can do player.thingy.think and so on. Maybe we should add a hook
so you can do the same...
best regards,
--
Matthew T. Atkinson <[EMAIL PROTECTED]>
_______________________________________________
AGRIP-discuss mailing list
[email protected]
http://lists.agrip.org.uk/cgi-bin/mailman/listinfo/agrip-discuss
--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.1.385 / Virus Database: 268.5.1/326 - Release Date: 4/27/2006
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.385 / Virus Database: 268.5.1/326 - Release Date: 4/27/2006
_______________________________________________
AGRIP-discuss mailing list
[email protected]
http://lists.agrip.org.uk/cgi-bin/mailman/listinfo/agrip-discuss