Posted by Osan`gar on February 09, 1998 at 17:29:32:
In Reply to: Re: Cog question CogKing posted by CogKing on February 09, 1998 at 12:37:56:
> > Ok, I have a cog script that I am making and I need to detect the vector (position) of the player that enters the sector. I am doing something else with the cog, but I just need to know the position of the player in order to use that vector later. Here is a sample of what I have done.
> symbols
> int victim local
> int senderRef local
> vector pos local
> code
> entered:
> victim = GetSourceRef();
> senderRef = GetSenderRef();
> pos = GetThingPos(victim);
> Return;
> end;
> > The thing is, I want to detect the position of the victim later in the cog. Any ideas? I thought about GetThingPos(), but I need a thing for an element of that verb. How could I use the player integer to detect the players position? Or will I have to do something else?
> as above : pos will be the position of the player when he enters the sector.
> If you want his position later just reuse GetThingPos(victim). Be careful in
> multiplayer tho, as many players can enter the sector and will overwrite the
> victim variable quite hapilly.
> -CogKing
I thought that was what I should do, but I wasn't sure if I need victim to be a thing or not. I don't have to worry about the sector though; it will be separated. ;) Wait and see...