| Blockland Forums > Modification Help |
| Set Field-of-View (Fov) |
| << < (2/3) > >> |
| Crysist:
--- Code: ---datablock gunImage::onActivate(FovChange) { setFov(30); } --- End code --- ? |
| EpicFrySauce:
--- Quote from: Crysist on December 01, 2011, 09:29:47 PM --- --- Code: ---datablock gunImage::onActivate(FovChange) { setFov(30); } --- End code --- ? --- End quote --- Hang on Ima try that... Edit: No... that didn't work either. I know this isn't that hard to do... I just don't have the details to do it. |
| Munkey:
--- Quote from: Amade on December 01, 2011, 08:16:34 PM ---You would either need client-side coding or a separate player datablock for use with the gun to make this work. --- End quote --- Nope. --- Code: ---function gunImage::onMount(%this,%obj,%slot) { %client = %obj.client; %client.setControlCameraFov(23); parent::onMount(%this,%obj,%slot); } function gunImage::onUnMount(%this,%obj,%slot) { %client = %obj.client; %client.setControlCameraFov(90); parent::onUnMount(%this,%obj,%slot); } --- End code --- If you need more help, the AWP changes zoom when you go to sights, and back out when you exit. It is a very poorly scripted gun, however, because I didn't know what I was doing back then. |
| EpicFrySauce:
--- Quote from: Munkey on December 01, 2011, 10:09:03 PM ---Nope. --- Code: ---function gunImage::onMount(%this,%obj,%slot) { %client = %obj.client; %client.setControlCameraFov(23); parent::onMount(%this,%obj,%slot); } function gunImage::onUnMount(%this,%obj,%slot) { %client = %obj.client; %client.setControlCameraFov(90); parent::onUnMount(%this,%obj,%slot); } --- End code --- If you need more help, the AWP changes zoom when you go to sights, and back out when you exit. It is a very poorly scripted gun, however, because I didn't know what I was doing back then. --- End quote --- Thanks! That worked. You won the topic. To get good at stuff like that... would probably take a while... |
| Munkey:
--- Quote from: EpicFrySauce on December 01, 2011, 10:22:01 PM ---To get good at stuff like that... would probably take a while... --- End quote --- It just takes time and patience. It also helps if you know any other coding languages (sadly I don't, only torque). |
| Navigation |
| Message Index |
| Next page |
| Previous page |