Game Development Community

Making items effect player and weapon variables

by Stephen Clark · in Torque Game Engine · 08/09/2003 (4:06 pm) · 1 replies

I'm not sure why, maybe I'm searching on the wrong thing, but I cant seem to find any good examples of items effecting a player's (speed, total health, whatever) attributes? Is there not a good example of this?? I would also like to be able to change attributes of the weapon too. But this should be only for the clients player and weapon. I can change the datablocks but that isnt quite what I want...

Am I passing over a resource here or is there just not too much out there on items??

Thanks,

-s

#1
08/10/2003 (8:15 am)
That is because surprisingly, Torque does not support this functionally generically natively, just the opposite, it supports changing EVERY instance of an object at the same time. Datablocks should be immutable, because they effect very object at a class level.

you have to code in instance level variables on every object that you want to be mutable and different at the instance level.