how to hide weapon when player is in water?
by deepscratch · in Torque Game Engine Advanced · 03/18/2009 (7:34 am) · 5 replies
as the title says.
I need to hide and disable player weapons when he is in water, its really not normal to swim freestyle fith an m16 or swarmgun or even a pistol in your hand, now is it?
any suggestions as how to disable and hide them while in water would be a great help
thanks all.
I need to hide and disable player weapons when he is in water, its really not normal to swim freestyle fith an m16 or swarmgun or even a pistol in your hand, now is it?
any suggestions as how to disable and hide them while in water would be a great help
thanks all.
About the author
email me at medan121@gmail.com
Recent Threads
#2
03/18/2009 (10:12 am)
Something along the lines of: unmountImage(getMountedImage(), 0) ... right in there with the onEnterLiquid callback.
#3
works a treat
03/19/2009 (10:58 am)
ok, so I took%obj.unmountImage($WeaponSlot);out of the onMount function, and added it to the onEnterLiquid function, then took
%obj.mountImage(%obj.lastWeapon, $WeaponSlot);and added it to the onLeaveLiquid function.
works a treat
#4
A related question for you if you have a minute.
Did you make any progress on water density? I am having a similar issue and saw your post http://www.garagegames.com/community/forums/viewthread/81157
We want to put boats on water and not have them sink....but even just experimenting with Stronghold, setting density for the water and player seems to have no affect.
Thanks in advance for the reply!
04/07/2009 (10:09 am)
deepscratch,A related question for you if you have a minute.
Did you make any progress on water density? I am having a similar issue and saw your post http://www.garagegames.com/community/forums/viewthread/81157
We want to put boats on water and not have them sink....but even just experimenting with Stronghold, setting density for the water and player seems to have no affect.
Thanks in advance for the reply!
Torque Owner Quinton Delpeche
Gobbo Games
This should do the trick for you.
Obviously you will need to get the reference to the player/ghost and trigger the unmount when you enter the water.