|
Post by cbrandick on Apr 18, 2015 21:50:27 GMT
I apologize if this question has already been asked. I searched and didn't see anything on it. I want to try out this product, but I have already written custom classes with variables for character attributes (attack, defense, etc.). I want to use these scripts. Can I easily integrate these variables into Core Gamekit? Thanks in advance!  Charles
|
|
acorrow
New Member
Posts: 6
Posts: 6
|
Post by acorrow on Apr 18, 2015 22:34:48 GMT
I'm prob gonna be corrected here but I will take a stab at this  Yes this is totally possible. You can attach a listener to just about ANYTHING. But I'm not sure that would even be needed in this scenario. You could simply add a reference to DarkTonic.CoreGamekit in your existing class, then do something like this: var Health = WorldVariableTracker.GetWorldVariable ("Health"); Health.CurrentIntValue = 20; Set something to that effect in your existing class every time you take damage. Or setup an EXP variable (again comes set for you already) and add to that. Or don't forget if you have a FLOAT value that is different! var FloatVariable= WorldVariableTracker.GetWorldVariable ("FloatVariable"); FloatVariable.CurrentFloatValue = 20; I have this set in a killable listener, but you could really do this anywhere, especially easy since the new build has namespace reference (DarkTonic.CoreGamekit) Hope that helps. Adam
|
|
|
Post by DarkTonic Dev on Apr 19, 2015 3:18:57 GMT
Kinda, acorrow.
It works the other way. You could use a WorldVariableListener class to update *other things* when World Variables get updated, but not vice versa. So you'd need to make some scripts that set World Variables whenever your non-CGK variables get updated, and then you'll be able to use them.
|
|