Changing key values ingame


(Yatta) #1

Hi, Ive read that It is possible to change keys values with script, and tried to do so. However, on a particular piece of script I have a bug which could be caused by a non working value change.

I have two invisible_user with keys “allowteams” set to either “axis”, “allies” or “allies,axis”.

At some point of the script the allowed teams should change, but this doesnt work. Its a quite complex script so Im still investigating, however If someone know changing keys/values can be a problem, please tell me :slight_smile:


(kamikazee) #2

I believe you can’t change keys at every point you want. You can use the set{} construct in a spawn trigger, but that’s about it.

If you want your func_invisible_user to work properly then, you might have to make 3 of them with their own name and “allowteam” settings. You would then setstate <name> default the appropriate f_i_u while you use setstate <name> invisible on the others to make sure they can’t be used.


(Yatta) #3

Oww …
Well ill try to do that but that’s gonna be hard I think, regarding the fact im already at the entity number limit. @_@

Thanks for the quick answer :slight_smile: