Can anyone tell me when I a have a pawn ID in a variable ${anID} how I refer the its location? Would it be ${Pawn[${anID}].Location} ?
I am trying to put together an atom that will log all the pawns I run across with thier location. The onPawnSpawned event returns the four variables that are passed to this atom below. I would also like to log the location. But I am uncertain how to refer to the location of a particular pawn when I have its ID.
My goal is like below in that I was to echo/log the location.
Thank you very much.
I am trying to put together an atom that will log all the pawns I run across with thier location. The onPawnSpawned event returns the four variables that are passed to this atom below. I would also like to log the location. But I am uncertain how to refer to the location of a particular pawn when I have its ID.
My goal is like below in that I was to echo/log the location.
Thank you very much.
Code:
atom(script) SpawnLog_onPawnSpawned(string anID, string aName, string aLevel, string aType)
{
echo "Pawn Spawned: ${aName} (${anID}) :: ${aLevel} :: ${aType} chunk: ${Me.Chunk} ${Pawn[${anID}].Location}"
}