3D Rad - Free 3D game maker - Forum

This forum is now archived!

This forum is locked, and is a read-only version. A new community-ran forum can be found at classdev.net

News:

The 3DRad community can be found at classdev.net.

Pages: [1]

Author Topic: how to make the cam chase object to zoom. please help me out  (Read 445 times)

« on: August 09, 2013, 03:05:04 AM »
I am actually working on a game, and i want the cam chase object to zoom in when the player presses the aim button an to zoom out when the player releases he aim button, i wrote a script and it did not work, please here is the script, please i am so confused. ???



voidmain0
{
 OUT_0=75;
 {
  if(iMouseDown(1));
  {
   OUT_0=55;
  }
  else
  {
   OUT_0=75;
   }
 }
}

Please someone should help me out.
Thanks in advance.
« Reply #1 on: August 09, 2013, 08:44:21 AM »
Someone please help me out
« Reply #2 on: August 10, 2013, 02:58:57 AM »
I have to be honest - I'm only posting here so you're query gets some exposure (new posts need to be moderated, and then don't always show up as unread topics - so can get missed).

I know for a fact that cypermethrin has created exactly this (and it looks stunning), maybe he'll be along in a while to share what he did or help you out a touch.
« Reply #3 on: August 10, 2013, 03:12:01 AM »
void Main()
{
   if(iMouseDown(1)) OUT_0 = 55;
   else OUT_0 = 75;
}

You misspelled "void Main()", the first "OUT_0 = 75" is not necessary and the brackets around the if- and else-statements are not necessary.
Rocket Rumble, a 3D Rad puzzle game:
http://www.3drad.com/forum/index.php?topic=9896.0

Marroc

« Reply #4 on: August 10, 2013, 06:14:29 AM »
Man u asked same thing 3 times ? ???
« Reply #5 on: August 10, 2013, 06:37:28 AM »
In my new spirit of helpfulness (mine won't last like Roberto's) you will find an issue with changing FOV, - resolution becomes poor if you zoom a long way, the only way around this I've found is to actually move the camera closer to the object (red dwarf human eyeball zoom function for those old enough and English).
Check out the 'LocalToParent' function of an easy way to do this.
« Reply #6 on: August 10, 2013, 08:21:10 AM »
Thanks for the script.
« Reply #7 on: August 10, 2013, 08:23:12 AM »
RobertooMolvadoo, thanks a lot.
Pages: [1]