Blockland Forums > Modification Help
Getting a projectile's source item's user's client
(1/5) > >>
Unicide:
In the ProjectileData::onDamage function, there's an argument for the projectile's object. I want to get this object's user's client. I know it'll be something like:

--- Code: ---%obj.sourceObject.getImage().getUser().getClient()

--- End code ---
but obviously that is not actual code. How would I go about doing this?
Destiny/Zack0Wack0:
Do you want the client (GameConnection) that fired the projectile? (isObject(%obj.sourceClient) ? %obj.sourceClient : %obj.client)
Unicide:
Do projectiles have a sourceClient variable? I didn't know that.
Destiny/Zack0Wack0:
I think so (I can't remember tbh).
Amade:

--- Quote from: Destiny/Zack0Wack0 on October 08, 2011, 09:34:09 PM ---I think so (I can't remember tbh).
--- End quote ---
They do.
Navigation
Message Index
Next page

Go to full version