BVB Source Codes

CRYENGINE Show ScriptBind_Action.h Source code

Return Download CRYENGINE: download ScriptBind_Action.h Source code - Download CRYENGINE Source code - Type:.h
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. #ifndef __SCRIPTBIND_ACTION__
  4. #define __SCRIPTBIND_ACTION__
  5.  
  6. #pragma once
  7.  
  8. #include <CryScriptSystem/IScriptSystem.h>
  9. #include <CryScriptSystem/ScriptHelpers.h>
  10. #include <IViewSystem.h>
  11.  
  12. // FIXME: Cell SDK GCC bug workaround.
  13. #ifndef __IGAMEOBJECTSYSTEM_H__
  14.         #include "IGameObjectSystem.h"
  15. #endif
  16.  
  17. class CCryAction;
  18.  
  19. class CScriptBind_Action :
  20.         public CScriptableBase
  21. {
  22. public:
  23.         CScriptBind_Action(CCryAction* pCryAction);
  24.         virtual ~CScriptBind_Action();
  25.  
  26.         void         Release() { delete this; };
  27.  
  28.         virtual void GetMemoryUsage(ICrySizer* pSizer) const
  29.         {
  30.                 pSizer->AddObject(this, sizeof(*this));
  31.         }
  32.  
  33.         //! <code>Action.LoadXML(definitionFile, dataFile)</code>
  34.         //!             <param name="definitionFile">.</param>
  35.         //!             <param name="dataFile">XML-lua data file name.</param>
  36.         int LoadXML(IFunctionHandler* pH, const char* definitionFile, const char* dataFile);
  37.  
  38.         //! <code>Action.SaveXML(definitionFile, dataFile, dataTable)</code>
  39.         //!             <param name="definitionFile">.</param>
  40.         //!             <param name="dataFile">XML-lua data file name.</param>
  41.         //!             <param name="dataTable">.</param>
  42.         int SaveXML(IFunctionHandler* pH, const char* definitionFile, const char* dataFile, SmartScriptTable dataTable);
  43.  
  44.         //! <code>Action.IsServer()</code>
  45.         //! <returns>true if the current script runs on a server.</returns>
  46.         int IsServer(IFunctionHandler* pH);
  47.  
  48.         //! <code>Action.IsClient()</code>
  49.         //! <returns>true if the current script runs on a client.</returns>
  50.         int IsClient(IFunctionHandler* pH);
  51.  
  52.         //! <code>Action.IsGameStarted()</code>
  53.         //! <description>true if the game has started.</description>
  54.         int IsGameStarted(IFunctionHandler* pH);
  55.  
  56.         //! <code>Action.IsRMIServer()</code>
  57.         //! <description>true if the current script is running on an RMI (Remote Method Invocation) server.</description>
  58.         int IsRMIServer(IFunctionHandler* pH);
  59.  
  60.         //! <code>Action.GetPlayerList()</code>
  61.         //! <description>Checks the current players list.</description>
  62.         int GetPlayerList(IFunctionHandler* pH);
  63.  
  64.         //! <code>Action.IsGameObjectProbablyVisible( gameObject )</code>
  65.         //!             <param name="gameObject">Object that we want to check.</param>
  66.         //! <returns>true if an object is probably visible.</returns>
  67.         int IsGameObjectProbablyVisible(IFunctionHandler* pH, ScriptHandle gameObject);
  68.  
  69.         //! <code>Action.ActivateEffect( name )</code>
  70.         //!             <param name="name">Name of the effect.</param>
  71.         //! <description>Activates the specified effect.</description>
  72.         int ActivateEffect(IFunctionHandler* pH, const char* name);
  73.  
  74.         //! <code>Action.GetWaterInfo( pos )</code>
  75.         //!             <param name="pos">Position to be checked.</param>
  76.         //! <description>Gets information about the water at the position pos.</description>
  77.         int GetWaterInfo(IFunctionHandler* pH, Vec3 pos);
  78.  
  79.         //! <code>Action.SetViewCamera()</code>
  80.         //! <description>Saves the previous valid view and override it with the current camera settings.</description>
  81.         int SetViewCamera(IFunctionHandler* pH);
  82.  
  83.         //! <code>Action.ResetToNormalCamera()</code>
  84.         //! <description>Resets the camera to the last valid view stored.</description>
  85.         int ResetToNormalCamera(IFunctionHandler* pH);
  86.  
  87.         //! <code>Action.GetServer( number )</code>
  88.         //! <description>Gets the server.</description>
  89.         int GetServer(IFunctionHandler* pFH, int number);
  90.  
  91.         //! <code>Action.RefreshPings()</code>
  92.         //! <description>Refreshes pings for all the servers listed.</description>
  93.         int RefreshPings(IFunctionHandler* pFH);
  94.  
  95.         //! <code>Action.ConnectToServer( server )</code>
  96.         //!             <param name="server">String that specifies the server to be used for the connection.</param>
  97.         //! <description>Connects to the specified server.</description>
  98.         int ConnectToServer(IFunctionHandler* pFH, char* server);
  99.  
  100.         //! <code>Action.GetServerTime()</code>
  101.         //! <description>Gets the current time on the server.</description>
  102.         int GetServerTime(IFunctionHandler* pFH);
  103.  
  104.         //! <code>Action.PauseGame( pause )</code>
  105.         //!             <param name="pause">True to set the game into the pause mode, false to resume the game.</param>
  106.         //! <description>Puts the game into pause mode.</description>
  107.         int PauseGame(IFunctionHandler* pFH, bool pause);
  108.  
  109.         //! <code>Action.IsImmersivenessEnabled()</code>
  110.         //! <returns>true if immersive multiplayer is enabled.</returns>
  111.         int IsImmersivenessEnabled(IFunctionHandler* pH);
  112.  
  113.         //! <code>Action.IsChannelSpecial()</code>
  114.         //! <returns>true if the channel is special.</returns>
  115.         int IsChannelSpecial(IFunctionHandler* pH);
  116.  
  117.         //! <code>Action.ForceGameObjectUpdate( entityId, force )</code>
  118.         //!             <param name="entityId">Identifier for the entity.</param>
  119.         //!             <param name="force">True to force the update, false otherwise.</param>
  120.         //! <description>Forces the game object to be updated.</description>
  121.         int ForceGameObjectUpdate(IFunctionHandler* pH, ScriptHandle entityId, bool force);
  122.  
  123.         //! <code>Action.CreateGameObjectForEntity( entityId )</code>
  124.         //!             <param name="entityId">Identifier for the entity.</param>
  125.         //! <description>Creates a game object for the specified entity.</description>
  126.         int CreateGameObjectForEntity(IFunctionHandler* pH, ScriptHandle entityId);
  127.  
  128.         //! <code>Action.BindGameObjectToNetwork( entityId )</code>
  129.         //!             <param name="entityId">Identifier for the entity.</param>
  130.         //! <description>Binds game object to the network.</description>
  131.         int BindGameObjectToNetwork(IFunctionHandler* pH, ScriptHandle entityId);
  132.  
  133.         //! <code>Action.ActivateExtensionForGameObject( entityId, extension, activate )</code>
  134.         //!             <param name="entityId">Identifier for the entity.</param>
  135.         //!             <param name="extension">Extension name.</param>
  136.         //!             <param name="activate">True to activate the extension, false to deactivate it.</param>
  137.         //! <description>Activates a specified extension for a game object.</description>
  138.         int ActivateExtensionForGameObject(IFunctionHandler* pH, ScriptHandle entityId, const char* extension, bool activate);
  139.  
  140.         //! <code>Action.SetNetworkParent( entityId, parentId )</code>
  141.         //!             <param name="entityId">Identifier for the entity.</param>
  142.         //!             <param name="parentID">Identifier for the parent network.</param>
  143.         //! <description>Sets the network parent.</description>
  144.         int SetNetworkParent(IFunctionHandler* pH, ScriptHandle entityId, ScriptHandle parentId);
  145.  
  146.         //! <code>Action.IsChannelOnHold( channelId )</code>
  147.         //!             <param name="channelId">Identifier for the channel.
  148.         //! <description>Checks if the specified channel is on hold.</description>
  149.         int IsChannelOnHold(IFunctionHandler* pH, int channelId);
  150.  
  151.         //! <code>Action.BanPlayer( entityId, message )</code>
  152.         //!             <param name="entityId">Identifier for the entity.</param>
  153.         //!             <param name="message">Message for the ban.</param>
  154.         //! <description>Bans a specified player.</description>
  155.         int BanPlayer(IFunctionHandler* pH, ScriptHandle entityId, const char* message);
  156.  
  157.         //! <code>Action.PersistantSphere( pos, radius, color, name, timeout )</code>
  158.         //!             <param name="pos">Position of the sphere.</param>
  159.         //!             <param name="radius">Radius of the sphere.</param>
  160.         //!             <param name="color">Color of the sphere.</param>
  161.         //!             <param name="name">Name assigned to the sphere.</param>
  162.         //!             <param name="timeout">Timeout for the sphere.</param>
  163.         //! <description>Adds a persistent sphere to the world.</description>
  164.         int PersistantSphere(IFunctionHandler* pH, Vec3 pos, float radius, Vec3 color, const char* name, float timeout);
  165.  
  166.         //! <code>Action.PersistantLine( start, end, color, name, timeout )     </code>
  167.         //!             <param name="start">Starting position of the line.</param>
  168.         //!             <param name="end">Ending position of the line.</param>
  169.         //!             <param name="color">Color of the line.</param>
  170.         //!             <param name="name">Name assigned to the line.</param>
  171.         //!             <param name="timeout">Timeout for the line.</param>
  172.         //! <description>Adds a persistent line to the world.</description>
  173.         int PersistantLine(IFunctionHandler* pH, Vec3 start, Vec3 end, Vec3 color, const char* name, float timeout);
  174.  
  175.         //! <code>Action.PersistantArrow( pos, radius, dir, color, name, timeout )</code>
  176.         //!             <param name="pos">Position of the arrow.</param>
  177.         //!             <param name="radius">Radius of the arrow.</param>
  178.         //!             <param name="dir">Direction of the arrow.</param>
  179.         //!             <param name="color">Color of the arrow.</param>
  180.         //!             <param name="name">Name assigned to the arrow.</param>
  181.         //!             <param name="timeout">Timeout for the arrow.</param>
  182.         //! <description>Adds a persistent arrow to the world.</description>
  183.         int PersistantArrow(IFunctionHandler* pH, Vec3 pos, float radius, Vec3 dir, Vec3 color, const char* name, float timeout);
  184.  
  185.         //! <code>Action.Persistant2DText( text, size, color, name, timeout )</code>
  186.         //!             <param name="text">Text that has to be displayed.</param>
  187.         //!             <param name="size">Size of the 2D text.</param>
  188.         //!             <param name="color">Color of the 2D text.</param>
  189.         //!             <param name="name">Name assigned to the 2D text.</param>
  190.         //!             <param name="timeout">Timeout for the 2D text.</param>
  191.         //! <description>Adds a persistent 2D text.</description>
  192.         int Persistant2DText(IFunctionHandler* pH, const char* text, float size, Vec3 color, const char* name, float timeout);
  193.  
  194.         //! <code>Action.PersistantEntityTag( entityId, text )</code>
  195.         //!             <param name="entityId">Identifier for the entity.</param>
  196.         //!             <param name="text">Text for the entity tag.</param>
  197.         //! <description>Adds a persistent entity tag.</description>
  198.         int PersistantEntityTag(IFunctionHandler* pH, ScriptHandle entityId, const char* text);
  199.  
  200.         //! <code>Action.ClearEntityTags( entityId )</code>
  201.         //!             <param name="entityId">Identifier for the entity.</param>
  202.         //! <description>Clears the tag for the specified entity.</description>
  203.         int ClearEntityTags(IFunctionHandler* pH, ScriptHandle entityId);
  204.  
  205.         //! <code>Action.ClearStaticTag( entityId, staticId )</code>
  206.         //!             <param name="entityId">Identifier for the entity.</param>
  207.         //!             <param name="staticId">Identifier for the static tag.</param>
  208.         //! <description>Clears the specified static tag for the specified entity.</description>
  209.         int ClearStaticTag(IFunctionHandler* pH, ScriptHandle entityId, const char* staticId);
  210.  
  211.         //! <code>Action.SendGameplayEvent( entityId, event )</code>
  212.         //!             <param name="entityId">Identifier for the entity.</param>
  213.         //!             <param name="event">Integer for the event.</param>
  214.         //! <description>Sends an event for the gameplay.</description>
  215.         int SendGameplayEvent(IFunctionHandler* pH, ScriptHandle entityId, int event);
  216.  
  217.         //! <code>Action.CacheItemSound( itemName )</code>
  218.         //!             <param name="itemName">Item name string.</param>
  219.         //! <description>Caches an item sound.</description>
  220.         int CacheItemSound(IFunctionHandler* pH, const char* itemName);
  221.  
  222.         //! <code>Action.CacheItemGeometry( itemName )</code>
  223.         //!             <param name="itemName">Item name string.</param>
  224.         //! <description>Caches an item geometry.</description>
  225.         int CacheItemGeometry(IFunctionHandler* pH, const char* itemName);
  226.  
  227.         //! <code>Action.DontSyncPhysics( entityId )</code>
  228.         //!             <param name="entityId">Identifier for the entity.</param>
  229.         //! <description>Doesn't sync physics for the specified entity.</description>
  230.         int DontSyncPhysics(IFunctionHandler* pH, ScriptHandle entityId);
  231.  
  232.         //! <code>Action.EnableSignalTimer( entityId, sText )</code>
  233.         //!             <param name="entityId">Identifier for the entity.
  234.         //!             <param name="sText">Text for the signal.</param>
  235.         //! <description>Enables the signal timer.</description>
  236.         int EnableSignalTimer(IFunctionHandler* pH, ScriptHandle entityId, const char* sText);
  237.  
  238.         //! <code>Action.DisableSignalTimer( entityId, sText )</code>
  239.         //!             <param name="entityId">Identifier for the entity.</param>
  240.         //!             <param name="sText">Text for the signal.</param>
  241.         //! <description>Disables the signal timer.</description>
  242.         int DisableSignalTimer(IFunctionHandler* pH, ScriptHandle entityId, const char* sText);
  243.  
  244.         //! <code>Action.SetSignalTimerRate( entityId, sText, fRateMin, fRateMax )</code>
  245.         //!             <param name="entityId">Identifier for the entity.</param>
  246.         //!             <param name="sText">Text for the signal.</param>
  247.         //!             <param name="fRateMin">Minimum rate for the signal timer.</param>
  248.         //!             <param name="fRateMax">Maximum rate for the signal timer.</param>
  249.         //! <description>Sets the rate for the signal timer.</description>
  250.         int SetSignalTimerRate(IFunctionHandler* pH, ScriptHandle entityId, const char* sText, float fRateMin, float fRateMax);
  251.  
  252.         //! <code>Action.ResetSignalTimer( entityId, sText )</code>
  253.         //!             <param name="entityId">Identifier for the entity.</param>
  254.         //!             <param name="sText">Text for the signal.</param>
  255.         //! <description>Resets the rate for the signal timer.</description>
  256.         int ResetSignalTimer(IFunctionHandler* pH, ScriptHandle entityId, const char* sText);
  257.  
  258.         //! <code>Action.EnableRangeSignaling( entityId, bEnable )</code>
  259.         //!             <param name="entityId">Identifier for the entity.</param>
  260.         //!             <param name="bEnable">Enable/Disable range signalling.</param>
  261.         //! <description>Enable/Disable range signalling for the specified entity.</description>
  262.         int EnableRangeSignaling(IFunctionHandler* pH, ScriptHandle entityId, bool bEnable);
  263.  
  264.         //! <code>Action.DestroyRangeSignaling( entityId )</code>
  265.         //!             <param name="entityId">Identifier for the entity.</param>
  266.         int DestroyRangeSignaling(IFunctionHandler* pH, ScriptHandle entityId);
  267.  
  268.         //! <code>Action.ResetRangeSignaling( entityId )</code>
  269.         //!             <param name="entityId">Identifier for the entity.</param>
  270.         int ResetRangeSignaling(IFunctionHandler* pH, ScriptHandle entityId);
  271.  
  272.         //! <code>Action.AddRangeSignal( entityId, fRadius, fFlexibleBoundary, sSignal )</code>
  273.         //!             <param name="entityId">Identifier for the entity.</param>
  274.         //!             <param name="fRadius">Radius of the range area.</param>
  275.         //!             <param name="fFlexibleBoundary">Flexible boundary size.</param>
  276.         //!             <param name="sSignal">String for signal.</param>
  277.         //! <description>Adds a range for the signal.</description>
  278.         int AddRangeSignal(IFunctionHandler* pH, ScriptHandle entityId, float fRadius, float fFlexibleBoundary, const char* sSignal);
  279.  
  280.         //! <code>Action.AddTargetRangeSignal( entityId, targetId, fRadius, fFlexibleBoundary, sSignal )</code>
  281.         //!             <param name="entityId">Identifier for the entity.</param>
  282.         //!             <param name="targetId">Identifier for the target.</param>
  283.         //!             <param name="fRadius">Radius of the range area.</param>
  284.         //!             <param name="fFlexibleBoundary">Flexible boundary size.</param>
  285.         //!             <param name="sSignal">String for signal.</param>
  286.         int AddTargetRangeSignal(IFunctionHandler* pH, ScriptHandle entityId, ScriptHandle targetId, float fRadius, float fFlexibleBoundary, const char* sSignal);
  287.  
  288.         //! <code>Action.AddRangeSignal( entityId, fAngle, fFlexibleBoundary, sSignal )</code>
  289.         //!             <param name="entityId">Identifier for the entity.</param>
  290.         //!             <param name="fAngle">Angle value.</param>
  291.         //!             <param name="fFlexibleBoundary">Flexible boundary size.</param>
  292.         //!             <param name="sSignal">String for signal.</param>
  293.         //! <description>Adds an angle for the signal.</description>
  294.         int AddAngleSignal(IFunctionHandler* pH, ScriptHandle entityId, float fAngle, float fFlexibleBoundary, const char* sSignal);
  295.  
  296.         //! <code>Action.RegisterWithAI()</code>
  297.         //! <description>Registers the entity to AI System, creating an AI object associated to it.</description>
  298.         int RegisterWithAI(IFunctionHandler* pH);
  299.  
  300.         //! <code>Action.HasAI( entityId )</code>
  301.         //! <returns>true if the entity has an AI object associated to it, meaning it has been registered with the AI System</returns>
  302.         int HasAI(IFunctionHandler* pH, ScriptHandle entityId);
  303.  
  304.         //! <code>Action.GetClassName( classId )</code>
  305.         //! <returns>the matching class name if available for specified classId.</returns>
  306.         int GetClassName(IFunctionHandler* pH, int classId);
  307.  
  308.         //! <code>Action.SetAimQueryMode( entityId, mode )</code>
  309.         //!             <param name="entityId">Identifier for the entity.</param>
  310.         //!             <param name="mode">QueryAimFromMovementController or OverriddenAndAiming or OverriddenAndNotAiming</param>
  311.         //! <description>
  312.         //!             Set the aim query mode for the ai proxy. Normally the ai proxy
  313.         //!             asks the movement controller if the character is aiming.
  314.         //!             You can override that and set your own 'isAiming' state.
  315.         //! </description>
  316.         int SetAimQueryMode(IFunctionHandler* pH, ScriptHandle entityId, int mode);
  317.  
  318.         //! <code>Action.PreLoadADB( adbFileName )</code>
  319.         //!             <param name="adbFileName">The path and filename of the animation ADB file which is to be pre-loaded.</param>
  320.         //! <description>Use this function to pre-cache ADB files.</description>
  321.         int PreLoadADB(IFunctionHandler* pH, const char* adbFileName);
  322.  
  323. private:
  324.         void RegisterGlobals();
  325.         void RegisterMethods();
  326.  
  327.         CCryAction* m_pCryAction;
  328.         IView*      m_pPreviousView;
  329. };
  330.  
  331. #endif
  332.  
downloadScriptBind_Action.h Source code - Download CRYENGINE Source code
Related Source Codes/Software:
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top