2
\$\begingroup\$

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?

\$\endgroup\$
2
\$\begingroup\$

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.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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