Difference between revisions of "Script/Creature"

From SF3
Jump to: navigation, search
(class Creature)
Line 65: Line 65:
 
|-
 
|-
 
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]]  
 
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]]  
| style='color: black; width: 90%; line-height: 0.8;' | '''Stop''' ([[../LevelReference@|LevelReference@]] ''_Level'')
+
| style='color: black; width: 90%; line-height: 0.8;' | '''Stop''' ([[../LevelReference|LevelReference@]] ''_Level'')
 
|-
 
|-
 
|
 
|
Line 71: Line 71:
 
|-
 
|-
 
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]]  
 
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]]  
| style='color: black; width: 90%; line-height: 0.8;' | '''FollowPath''' ([[../LevelReference@|LevelReference@]] ''_Level'', const [[../BasicDataTypes|string]]&in ''_sPathName'', const [[../BasicDataTypes|bool]] ''_bForward'', const [[../BasicDataTypes|bool]] ''_bQueued'')
+
| style='color: black; width: 90%; line-height: 0.8;' | '''FollowPath''' ([[../LevelReference|LevelReference@]] ''_Level'', const [[../BasicDataTypes|string]]&in ''_sPathName'', const [[../BasicDataTypes|bool]] ''_bForward'', const [[../BasicDataTypes|bool]] ''_bQueued'')
 
|-
 
|-
 
|-
 
|-
 
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]]  
 
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]]  
| style='color: black; width: 90%; line-height: 0.8;' | '''GoTo''' ([[../LevelReference@|LevelReference@]] ''_Level'', const [[../Entity|Entity]]&in ''_Target'', const [[../BasicDataTypes|uint]] ''_uMinDistance'', const [[../BasicDataTypes|uint]] ''_uMaxDistance'', const [[../BasicDataTypes|bool]] ''_bQueued'')
+
| style='color: black; width: 90%; line-height: 0.8;' | '''GoTo''' ([[../LevelReference|LevelReference@]] ''_Level'', const [[../Entity|Entity]]&in ''_Target'', const [[../BasicDataTypes|uint]] ''_uMinDistance'', const [[../BasicDataTypes|uint]] ''_uMaxDistance'', const [[../BasicDataTypes|bool]] ''_bQueued'')
 
|-
 
|-
 
|
 
|
Line 81: Line 81:
 
|-
 
|-
 
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]]  
 
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]]  
| style='color: black; width: 90%; line-height: 0.8;' | '''Interact''' ([[../LevelReference@|LevelReference@]] ''_Level'', const [[../Entity|Entity]]&in ''_Target'', const [[../BasicDataTypes|bool]] ''_bQueued'')
+
| style='color: black; width: 90%; line-height: 0.8;' | '''Interact''' ([[../LevelReference|LevelReference@]] ''_Level'', const [[../Entity|Entity]]&in ''_Target'', const [[../BasicDataTypes|bool]] ''_bQueued'')
 
|-
 
|-
 
|
 
|
Line 87: Line 87:
 
|-
 
|-
 
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]]  
 
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]]  
| style='color: black; width: 90%; line-height: 0.8;' | '''Talk''' ([[../LevelReference@|LevelReference@]] ''_Level'', const [[../Entity|Entity]]&in ''_Target'', const [[../BasicDataTypes|string]]&in ''_sContainerName'', const [[../BasicDataTypes|string]]&in ''_sTopicName'', const [[../BasicDataTypes|bool]] ''_bQueued'')
+
| style='color: black; width: 90%; line-height: 0.8;' | '''Talk''' ([[../LevelReference|LevelReference@]] ''_Level'', const [[../Entity|Entity]]&in ''_Target'', const [[../BasicDataTypes|string]]&in ''_sContainerName'', const [[../BasicDataTypes|string]]&in ''_sTopicName'', const [[../BasicDataTypes|bool]] ''_bQueued'')
 
|-
 
|-
 
|
 
|
Line 93: Line 93:
 
|-
 
|-
 
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]]  
 
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]]  
| style='color: black; width: 90%; line-height: 0.8;' | '''Shoutout''' ([[../LevelReference@|LevelReference@]] ''_Level'', const [[../BasicDataTypes|string]]&in ''_sContainerName'', const [[../BasicDataTypes|string]]&in ''_sTopicName'', const [[../BasicDataTypes|bool]] ''_bQueued'')
+
| style='color: black; width: 90%; line-height: 0.8;' | '''Shoutout''' ([[../LevelReference|LevelReference@]] ''_Level'', const [[../BasicDataTypes|string]]&in ''_sContainerName'', const [[../BasicDataTypes|string]]&in ''_sTopicName'', const [[../BasicDataTypes|bool]] ''_bQueued'')
 
|-
 
|-
 
|
 
|
Line 99: Line 99:
 
|-
 
|-
 
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]]  
 
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]]  
| style='color: black; width: 90%; line-height: 0.8;' | '''DropItem''' ([[../LevelReference@|LevelReference@]] ''_Level'', const [[../BasicDataTypes|string]]&in ''_sItemName'', const [[../BasicDataTypes|uint]] ''_uAmount'')
+
| style='color: black; width: 90%; line-height: 0.8;' | '''DropItem''' ([[../LevelReference|LevelReference@]] ''_Level'', const [[../BasicDataTypes|string]]&in ''_sItemName'', const [[../BasicDataTypes|uint]] ''_uAmount'')
 
|-
 
|-
 
|
 
|

Revision as of 13:32, 26 August 2016

class Creature

Represents a reference to a creature in the game world.

Class Methods

string GetDescriptionName () const
get creature description name
string GetCreatureType () const
get creature type name
int GetCurrentHP () const
get current creature health
int GetMaxHP () const
get maximum creature health
bool IsPlayerControllable () const
can the creature be given commands by the player?
void SetPlayerControllable (const bool _bControllable)
set whether the creature can be controlled by the player
bool IsImmovable () const
can the creature be pushed around by others while idle?
void SetImmovable (const bool _bImmovable)
set whether the creature can be pushed around by others while idle (only valid until the creature gets another command).
bool Damage (const string&in _sDamageTypeName, const uint _uAmount)
damage the creature for _uAmount HP of the given damage type, returns true if killed
void Kill ()
immediately kill the creature
void Stop (LevelReference@ _Level)
stop the creature dead in its tracks immediately. cancels any pending orders.
void FollowPath (LevelReference@ _Level, const string&in _sPathName, const bool _bForward, const bool _bQueued)
void GoTo (LevelReference@ _Level, const Entity&in _Target, const uint _uMinDistance, const uint _uMaxDistance, const bool _bQueued)
make the creature walk to the given target
bool Interact (LevelReference@ _Level, const Entity&in _Target, const bool _bQueued)
make the creature interact with the given target
bool Talk (LevelReference@ _Level, const Entity&in _Target, const string&in _sContainerName, const string&in _sTopicName, const bool _bQueued)
make the creature talk to the given target
bool Shoutout (LevelReference@ _Level, const string&in _sContainerName, const string&in _sTopicName, const bool _bQueued)
make the creature talk to itself.
void DropItem (LevelReference@ _Level, const string&in _sItemName, const uint _uAmount)
drop the given item at the creature's feet
Creature& operator= (const Creature&in)
bool operator== (const Creature&in)
bool operator== (const Entity&in)
bool Exists () const
uint GetId () const
uint8 GetFaction () const
void SetFaction (const uint8 _Faction)
string GetEntityType () const
bool IsEnabled () const
void Enable (const bool _bEnabled)
bool IsInteractive () const
void SetInteractive (const bool _bInteractive)
bool CanBeAttacked () const
void SetAttackable (const bool _bAttackable)
Entity opImplConv () const

class Creature

Represents a reference to a creature in the game world.

Class Methods

string GetDescriptionName () const
get creature description name
string GetCreatureType () const
get creature type name
int GetCurrentHP () const
get current creature health
int GetMaxHP () const
get maximum creature health
bool IsPlayerControllable () const
can the creature be given commands by the player?
void SetPlayerControllable (const bool _bControllable)
set whether the creature can be controlled by the player
bool IsImmovable () const
can the creature be pushed around by others while idle?
void SetImmovable (const bool _bImmovable)
set whether the creature can be pushed around by others while idle (only valid until the creature gets another command).
bool Damage (const string&in _sDamageTypeName, const uint _uAmount)
damage the creature for _uAmount HP of the given damage type, returns true if killed
void Kill ()
immediately kill the creature
void Stop (LevelReference@ _Level)
stop the creature dead in its tracks immediately. cancels any pending orders.
void FollowPath (LevelReference@ _Level, const string&in _sPathName, const bool _bForward, const bool _bQueued)
void GoTo (LevelReference@ _Level, const Entity&in _Target, const uint _uMinDistance, const uint _uMaxDistance, const bool _bQueued)
make the creature walk to the given target
bool Interact (LevelReference@ _Level, const Entity&in _Target, const bool _bQueued)
make the creature interact with the given target
bool Talk (LevelReference@ _Level, const Entity&in _Target, const string&in _sContainerName, const string&in _sTopicName, const bool _bQueued)
make the creature talk to the given target
bool Shoutout (LevelReference@ _Level, const string&in _sContainerName, const string&in _sTopicName, const bool _bQueued)
make the creature talk to itself.
void DropItem (LevelReference@ _Level, const string&in _sItemName, const uint _uAmount)
drop the given item at the creature's feet
Creature& operator= (const Creature&in)
bool operator== (const Creature&in)
bool operator== (const Entity&in)
bool Exists () const
uint GetId () const
uint8 GetFaction () const
void SetFaction (const uint8 _Faction)
string GetEntityType () const
bool IsEnabled () const
void Enable (const bool _bEnabled)
bool IsInteractive () const
void SetInteractive (const bool _bInteractive)
bool CanBeAttacked () const
void SetAttackable (const bool _bAttackable)
Entity opImplConv () const