Problem with roles
Posted: Sun Nov 06, 2011 8:31 am
Guys,
Having problems with roles. A bit of background trying to script some actions for a ship building station and would like to recognise player ships that correspond to the ship types that are built at the station, so that differing actions can be provided. Whilst I can do this by using constructs like "if (player.ship.name === "xxx" !! player.ship.name === "yyy") I thought it would be easier on maintenance if I could assign a special role and use " if (player.ship.hasrole("rrr") ". However when I try this it fails, It would appear that the only role a player ship has is 'player', is this correct? NPC ships have the full list of roles when I list them in the console, but the player only ever shows 1 role, 'player'. The Wiki does not say anything about this restriction for the player ship, well in those pages I have read anyway.
Ironfist
Having problems with roles. A bit of background trying to script some actions for a ship building station and would like to recognise player ships that correspond to the ship types that are built at the station, so that differing actions can be provided. Whilst I can do this by using constructs like "if (player.ship.name === "xxx" !! player.ship.name === "yyy") I thought it would be easier on maintenance if I could assign a special role and use " if (player.ship.hasrole("rrr") ". However when I try this it fails, It would appear that the only role a player ship has is 'player', is this correct? NPC ships have the full list of roles when I list them in the console, but the player only ever shows 1 role, 'player'. The Wiki does not say anything about this restriction for the player ship, well in those pages I have read anyway.
Ironfist