![]() |
DynRPG v0.32 Unofficial
Plugin SDK
|
Used for the hero as subtype of characters. More...
#include <Hero.h>
Public Member Functions | |
| HeroControlMode | getControlMode () |
| Returns the current hero control mode. | |
| void | setControlMode (HeroControlMode controlMode) |
| Sets the hero control mode. | |
| void | act () |
| Built-in function to run various checks after a step has been made (NOT map collision!)... enemy encounters most importantly, event-related checks (not all known) | |
| void | checkEventOverlapTrigger (EventTrigger triggerType, bool startedByActionButton) |
| Check for event overlap. | |
| void | checkEventInFrontTrigger (EventTrigger triggerType, bool startedByActionButton) |
| Check for event in front. | |
Public Member Functions inherited from RPG::Character | |
| int | getScreenX () |
| Returns the current X screen coordinate. | |
| int | getScreenY () |
| Returns the current Y screen coordinate. | |
| void | setFixedStep (int newStep) |
| Sets a fixed step. | |
| void | setNormalStep () |
| Removes a fixed step position and goes back to normal. | |
| void | setAnimationType (RPG::AnimationType type) |
| Sets the animation type. | |
| bool | isMovePossible (int fromX, int fromY, int toX, int toY) |
| Checks whether a certain move is possible. | |
| std::string | getName () |
| Returns the name of the character. | |
| void | move (const char *data, int length, bool repeatPattern=false, bool ignoreImpossible=true, int frequency=8) |
| Moves a character. | |
| void | stop () |
| Stops the current movement. | |
| void | doStep (RPG::Direction direction) |
| Does one step (moves the character one tile into a certain direction) | |
Public Attributes | |
| bool | isEnteringVehicle |
| Only true if the hero is entering a vehicle. | |
| bool | isInVehicle |
| True when the hero has entered a vehicle. | |
| HeroVehicle | vehicle |
| Tells you whether the hero is in a vehicle at the moment. | |
| bool | isLeavingVehicle |
| Only true if the hero is dismounting a vehicle. | |
| bool | screenPanUnlocked |
| Can screen panning be used? | |
| int | mapOffsetX |
| int | mapOffsetY |
| int | mapHeroOffsetX |
| (default = 9*256) ?? | |
| int | mapHeroOffsetY |
| (default = 7*256) ?? | |
| HeroPanTransitionSpeed | panTransitionSpeed |
| Same as Pan Screen Transition Speed^4 (4: Normal would be 16) | |
Public Attributes inherited from RPG::Character | |
| int | id |
| ID of the event (zero if not an ordinary event) | |
| bool | enabled |
| Is the event visible and enabled? | |
| int | mapId |
| Map ID (only relevant for vehicles) | |
| int | x |
| X coordinate (tiles) | |
| int | y |
| Y coordinate (tiles) | |
| Direction_T | direction |
| Direction for moving (see RPG::Direction) | |
| Facing_T | facing |
| Direction for facing (see RPG::Facing) | |
| int | step |
| Current step value (see details) | |
| int | transparency |
Transparency value, between 0 (completely visible) to 8 (completely invisible) | |
| int | movementFramesLeft |
| Frames left until movement is completed (see details) | |
| int | frequency |
Current movement frequency (1 to 8) | |
| int | originalFrequency |
| Original movement frequency (use for "Move event" commands with a frequency different from the current one) | |
| Layer_T | layer |
| Layer (below/same level as/above hero, see RPG::Layer) | |
| bool | forbidEventOverlap |
true if the event cannot move onto a tile occupied by another event | |
| AnimationType_T | animationType |
| Animation type of the event (see details and RPG::AnimationType) | |
| bool | fixedDirection |
| Is the facing direction (facing) fixed? | |
| int | speed |
Current speed of the character (1 to 6, see also customExactSpeed) | |
| MoveRoute * | moveRoute |
| Current move route (can also be set by "Move Event" commands) | |
| bool | moving |
| Is the character currently moving? | |
| char | offsetX |
| Horizontal offset for drawing the event graphic (see details) | |
| char | offsetY |
| Vertical offset for drawing the event graphic (see offsetX) | |
| char | customExactSpeed |
| Custom exact speed (see details) | |
| int | moveRoutePosition |
| Position in move route. | |
| bool | moveRouteDone |
| Has the move route finished? | |
| bool | isHidden |
| Only works on hero. Determine if hidden. | |
| bool | slipThrough |
| bool | stopAnimation |
| bool | phasing |
| Is the "phasing mode" on? | |
| int | stepFrameCounter |
| Internally used, for stepping. | |
| int | stepTimer |
Internally used, for stepping (-1 if a fixed step is used, see setFixedStep) | |
| int | frequencyTimer |
| Internally used, for movement frequency. | |
| bool | eventJumping |
| Is the event jumping? | |
| int | beforeJumpX |
| Map's X value Before jumping. | |
| int | beforeJumpY |
| Map's Y value Before jumping. | |
| bool | isFlying |
| Flying flag for airship. | |
| DStringPtr | charsetFilename |
| Filename of the current charset. | |
| int | charsetId |
| ID of the current charset. | |
| bool | eventUpdatedThisFrame |
| Was the character's event updated this frame? | |
| int | flashR |
| The red value for sprite flashing. | |
| int | flashG |
| The green value for sprite flashing. | |
| int | flashB |
| The blue value for sprite flashing. | |
| int | flashIntensity |
| This is not the same as strength/power. | |
| int | flashTimer |
| The flash timer. Starts at time*6 & decreases each frame. | |
Used for the hero as subtype of characters.
| void RPG::Hero::act | ( | ) |
Built-in function to run various checks after a step has been made (NOT map collision!)... enemy encounters most importantly, event-related checks (not all known)
Use this function if the hero's movement behavior is being altered dramatically (pixel movement for instance), but still need enemy encounter checks.
| HeroControlMode RPG::Hero::getControlMode | ( | ) |
Returns the current hero control mode.
| void RPG::Hero::setControlMode | ( | HeroControlMode | controlMode | ) |
Sets the hero control mode.
| controlMode | The new control mode |