PVD
(PVD)
June 21, 2010, 6:30am
1
I have some problem i dont know exactly how to work with property i can show a string of code
PRonrel = OBweaponinfo['Wep_onreload_'+str(PRcurwep)]
where PRcurwep is integer
so for example if PRcurwep = 1 Then PRonrel is linked to property with name Wep_onreload_1 how i must write if i want my code work?
Sorry for my English :o
Monster
(Monster)
June 21, 2010, 10:20am
2
PVD
(PVD)
June 21, 2010, 11:35am
3
hm… maybe i dont undestand something? I didnt find something about that quastion in your url?
Sunjay03
(Sunjay)
June 21, 2010, 11:50am
4
Perhaps you could clarify your problem a bit more.
-Sunjay03
PVD
(PVD)
June 21, 2010, 11:57am
5
I have property i need get it using “some text”+string
http://tempfile.ru/file/1401126
PVD
(PVD)
June 21, 2010, 2:34pm
7
Oh thank to all i got the unswer of my question
bull-frog
(bull-frog)
June 21, 2010, 9:06pm
8
Here 's more info on and functions you can use with dictionaries.
http://www.tutorialspoint.com/python/python_dictionary.htm
Monster
(Monster)
June 21, 2010, 10:26pm
9
So you did not understand that little helper page …hm… than you should have a look into the Game Engine API .
The information you provide us is not complete. The question I have to you is (the same that Python has):
If that is a KX_GameObject the code seems to be fine.
Monster
(Monster)
June 22, 2010, 7:44am
11
PVD, thanks for saying this… but I still do not know what the problem is.
PVD
(PVD)
June 22, 2010, 2:48pm
12
My problem as in that i thought that for example PRreltim was linked to property Weapon_reload_time and so if i changed PRreltim the property Weapon_reload_time changed to. But in real not a link just integer with value as property Weapon_reload_time. And thats was all problem