Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For simplicity, let's say that I want bots to kill me when I enter a room without greeting them. So in this case I would need to store, somewhere, the variable didGreet, which should be changed when I send the message "Hello." Then, when any pawn sees me, he will check the didGreet variable and if this was false he would start firing at me.

I've heard that this should be done using the GameInfo class, but unfortunately I don't know how to create, access and change variables there. How can I accomplish this?

share|improve this question

Is your game only going to be single-player, or are you planning to have multiple players? Since the attribute you are wanting to record is 'per player' (eg; one player greeting the bots does not mean all players have greeted the bots) - then this kind of variable should be stored in your playercontroller class. In a singleplayer game, it is quite acceptable to store such variables in your gameinfo class instead.

If you need to know how to do this, I recommend going through some unrealscript tutorials, there are quite a few out there! Good luck.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.