Battle of Red Cliffs return value

I have been trying to do the Battle of Red Cliff’s challenge, and I wanted to try to use the choiceFunction() function, and it keeps returning values. The problem I have is that I can’t see what the returned values are because there are no say() or print() functions. Could you tell me how to use the returned value?

Thanks, Nathan

In the normal Game Devs, one method would be to define a variable as the spawned character…something like this:

var hero=game.spawnPlayerXY("samurai", 34, 8);

You should then be able to get the character to say your returned value:

hero.say(value);

I’m not participating in the challenge, so no promises this will work…good luck!

In the challenge I can’t say anything so I don’t think that will work, but thanks.

1 Like

Well darn…was afraid of that!

Have you fully read the hints? Try using game.log(). It’s debug tool made for this level. (like console.log for javascript).
If it still doesn’t work (and you don’t mind sharing your secrets :wink:) you could post your code to me in a PM (click on my icon, then the ‘message’ button) and I could take a look at it, if you want.
Danny

1 Like

Hi Deadpool198, I sent you a PM with my code could you help me out?