Gui accessing player variables
by Ricardo Cabral · in Torque Game Engine · 02/14/2005 (7:14 am) · 3 replies
Hey there,
i was wondering if it's possible to have a gui element to have access to player coordinates, because i needed to have a graphic that should be rendered in a dynamic position in the screen, according to the player's head position relative to body. i thought a good idea to implement this was to subclass GuiBitmapCtrl, but i need to access the player's mHead and mBody variables. how could this be done?
thanks
-nd
i was wondering if it's possible to have a gui element to have access to player coordinates, because i needed to have a graphic that should be rendered in a dynamic position in the screen, according to the player's head position relative to body. i thought a good idea to implement this was to subclass GuiBitmapCtrl, but i need to access the player's mHead and mBody variables. how could this be done?
thanks
-nd
About the author
#2
02/16/2005 (2:26 pm)
Problem is, how do i make sure im getting the members of the right player instance (the client)?
#3
That is an example of a gui element that looks into another object (the vehicle in this case) to extract data.
02/18/2005 (12:24 pm)
It would be a good idea to check out game/vehicles/guiSpeedometer.cc.That is an example of a gui element that looks into another object (the vehicle in this case) to extract data.
Associate Manoel Neto
Default Studio Name