Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Yeah, a few days ago I made a medkit script and left it here. But, uhh, I got a brilliant idea for some feedback if player took meds. Scaling FOV of camera like if player just used a bunch of morphine syringes at once. And here we go: action that smoothly changes FOV. The script: /* As usual, now about the properties: Camera - camera...? NewFOV - the FOV that the script will scale to. Time - time of scaling. DoWhenDone - action (-s) which will be executed once FOV stopped scaling. You can use this script for such things as aiming and... something... I guess. Anyway, feel free to use this code if you need so. Important: this action may cause some issues with "action_AnimateScale" since it is based on this one.
It is also possible that this script can cause severe meltdown of CPU, which will lead to massive explosion of your computer, probably killing you. Author is not in charge of possible consequences. |
||||
|
Maybe nothing ultra fancy fx or coding challenge so far but nevertheless super useful. Thanks @dekon_17 for doing the work with it and sharing the result with us. Good job! Works like a charm! |
||||
|
What would the syntax and vector math needed to make an enemy scene node attempt to hide from the new player FOV, so as to attempt to flank the player or ambush her/him. Can someone help me with an action for that? |
||||
|
you wrote: What would the syntax and vector math needed to make an enemy scene node attempt to hide from the new player FOV, so as to attempt to flank the player or ambush her/him. Can someone help me with an action for that? what do you mean? this script mimics the aiming event where you look through a scope or similar. You are pointing your player to an enemy then this zoomin event happens, maybe the programmer completes that with a nice scope image, and then the player aims and fires. Now you want the enemy to react to the zoomin event, wich is not logical as the enemy cant possibly know the players behavior. |
||||
|
Not necessarily completly zooming in, just a very small zoom, like a degree or two. I am trying build off this code. I am trying to find a way to get the enemy npc to perhaps move towards a node outside the players cone of vision, while avoiding the static geometry of the level, and looking towards and then attacking the player at random intervals. |
||||
|
@forloops If you want to detect if a node is in camera's field of vision, you could try using this: function isInCameraView(node){ It'll return true if the node is visible, and false if it's not. |
||||
|
Right on smnmhmdy:) Thanks again man... |
|