Hi dop2000,
Thanks for the response but I'm not sure I was really being clear on what I was after.
I have a set of enemy types and have a method that determines which one the player is up against. That is stored in the variable currentEnemyType. Eg:
var: currentEnemyType
...Goon
...Brute
...Mage
...Boss
...etc
What I'm trying to do is get the type of enemy inserted in to the name of an instance variable on the player sprite. Taking Goon as an example:
Player.attackGoonOneLand
And against a Brute it would say:
Player.attackBruteOneLand
So I'm trying to insert the variable of currentEnemyType
in to that instance variable:
Player.attack**currentEnemyType**OneLand
But I'm just not sure what to replace those asterisks with.
Dunno if this makes a difference, but the instance variable is a Number.