Hi again,
I need to be able to access the player object as at a previous frame in the engine. I assume something like this is not possible as the python bindings simply communicate with the server (which I cannot 'cache' so to speak).
Would my best bet just be to create another class that has a constructor which I pass a player object to, it runs the methods that will return the data I will eventually need and use that sort of like a cached last-frame version of the player?
Copy of player object
-
- Junior Member
- Posts: 19
- Joined: Fri Nov 06, 2015 11:49 pm
- L'In20Cible
- Project Leader
- Posts: 1536
- Joined: Sat Jul 14, 2012 9:29 pm
- Location: Québec
Well, almost all of the values are retrieved dynamically which means that even if you cache an object, all the values will remains the same as the engine. To be honnest, I'm not sure why you would ever need to access an object representing a player that... doesn't exist... What are you trying to do?
-
- Junior Member
- Posts: 19
- Joined: Fri Nov 06, 2015 11:49 pm
- L'In20Cible
- Project Leader
- Posts: 1536
- Joined: Sat Jul 14, 2012 9:29 pm
- Location: Québec
-
- Junior Member
- Posts: 19
- Joined: Fri Nov 06, 2015 11:49 pm
satoon101 wrote:Did you already forget this thread?
http://forums.sourcepython.com/showthread.php?1026
I think its technically a different issue?
satoon101 wrote:Just use a simple dictionary to do so. Check against the stored angle/location with the current values on the next frame, then update the stored values with the new ones before moving on.
Yes, that is what I was planning, just wanted to check if there was a more encompassing solution before going ahead with it. Thanks for the info.
Return to “Plugin Development Support”
Who is online
Users browsing this forum: No registered users and 105 guests