HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: [Solved] Check on how the camera is Active  (Read 1119 times)

Scelus

  • World Owners
  • ****
  • Posts: 9
    • View Profile
[Solved] Check on how the camera is Active
« on: Jul 17, 12, 09:48:20 PM »

In the wiki page http://wiki.heroengine.com/wiki/Camera#Free_Look says that this function returns if the camera is in "Free Look". But this page this function has no parameters but is HeroScript Editor function has a string as a parameter, which is the n ???ame of the camera.

How do I get the name of the camera?

I am NODEREF of the camera by cam as NodeRef = GetActiveCamera()

Thank you.
« Last Edit: Jul 17, 12, 10:08:24 PM by Scelus »
Logged

Scelus

  • World Owners
  • ****
  • Posts: 9
    • View Profile
Re: Check on how the camera is Active
« Reply #1 on: Jul 17, 12, 10:06:44 PM »

Ok guys I made ​​a mistake ... It was enough to use "*" in the name of the camera.
Many apologies
Logged

DragonFist

  • General Accounts
  • *
  • Posts: 140
    • View Profile
Re: [Solved] Check on how the camera is Active
« Reply #2 on: Jul 17, 12, 11:00:00 PM »

cam as NodeRef = GetActiveCamera()

cam["CameraName"]

Seems that on the client-side HSL uses that instead of cam.CameraName
Logged

Scelus

  • World Owners
  • ****
  • Posts: 9
    • View Profile
Re: [Solved] Check on how the camera is Active
« Reply #3 on: Jul 18, 12, 06:52:58 AM »

But the problem was that I wanted to know what was the name of the active camera to be able to tell if she was as FreeLook.

"GAME" "FLY" "MyCAM" ..

Because I wanted to disable the mouse wheel on the camera the game, not allowing removal of the character and approach.

However I found that the "FLY" mode no longer has a wheel so I just deactivated.
Logged

DragonFist

  • General Accounts
  • *
  • Posts: 140
    • View Profile
Re: [Solved] Check on how the camera is Active
« Reply #4 on: Jul 18, 12, 11:23:56 AM »

What I posted (cam["CameraName"]) will return the camera's name, if the noderef is called cam.
Logged

Scelus

  • World Owners
  • ****
  • Posts: 9
    • View Profile
Re: [Solved] Check on how the camera is Active
« Reply #5 on: Jul 18, 12, 11:27:25 AM »

understood. Sorry for the stupidity, I will as soon as possible to experiment with this information.

How do I get the properties of a NodeRef? example, how to know what is "CameraName" and if the other node. That is, where can these attributes?

Thanks you.
Logged

DragonFist

  • General Accounts
  • *
  • Posts: 140
    • View Profile
Re: [Solved] Check on how the camera is Active
« Reply #6 on: Jul 18, 12, 11:32:31 AM »

Actual code sample:

Code: [Select]
  cam as NodeRef = getActiveCamera()
  SetCameraOffset("*",gco)
  if ((gco >= 0.06) and cam["CameraName"] != "GAME")
    StartOS_Camera()
    character as NodeRef = GetPlayerCharacterNode()
    character["Render"] = true
  .

As for knowing hat the attributes are, I dunno.  I've found some of them by finding uses within the reference worlds.
Logged