1
Beginners' Technical Questions / Charactername in a variable [solved]
« on: 16 May 2013, 14:05 »
I'd like to know how I can use a charactername (cEgo for example) in a variable so I can use the variable and only have to declare the specific name once.
Example:
With for example 'String' I get a 'Type mismatch: cannot convert 'Character*' to 'String*'' at the 'Player1 = cEgo;' line.
Example:
Code: Adventure Game Studio
- // room script file
- String Player1;
- function room_AfterFadeIn()
- {
- Player1 = cEgo;
- }
- function room_RepExec()
- {
- if (player==Player1)
- {
- if (((NpcIsFollowing == false) && ((cEgo.x <= (cMerchant.x))......
- //more code//
- }
With for example 'String' I get a 'Type mismatch: cannot convert 'Character*' to 'String*'' at the 'Player1 = cEgo;' line.




