| 09-08-2007, 09:35 PM | #1 |
I know that GetLocalPlayer can be used for interface but strictly not objects, does anybody have a complete list of what can be done with it? All I know is...
So does anybody know all the things that CAN be done with GetLocalPlayer()?. |
| 09-08-2007, 09:48 PM | #2 |
Anything that doesn't have a gameplay impact, mainly. Exceptions are (I believe) GetCameraXXX stuff, which I think must be synced (not sure). Work from that and then 99.9% of the time you'll be fine. Special effects don't have a gameplay impact and so are fine. However, they can cause handle comparisons and stuff to desync, so it's best to create a special effect for all players, but with a string of "" for those you don't want to see it. Generally best never to create handles for one player, but one being "___.mdl" and one "" is not a problem. |
| 09-08-2007, 10:01 PM | #3 |
Hm, kay... so anything that's not a gameplay object manipulator (i.e creating units/damaging them) and except for some camera usage is fine with GetLocalPlayer? |
| 09-08-2007, 10:08 PM | #4 |
Basically. Be aware of things that don't look like they have an effect, but do. Actually any object creation is a bad idea due to repurcussions of it (so creating new unique strings MAY be an issue in some cirumstances). |
| 09-08-2007, 10:34 PM | #5 |
Hm, kay. Thanks. I needed quite a bit of clarification, thought it'd take a bit more to get through my skull. +Rep |
| 09-08-2007, 11:08 PM | #6 |
If you wanted to be careful with strings, create them firstly then use them where needed, so for example: JASS:function Snacks takes nothing returns nothing local string Model = "CheeseCake.mdl" // local player block endfunction So it creates the CheeseCake.mdl string for all players but you only use it for the one. |
