(Created page with "Currently copied shamelessly straight from the source. Needs to be cleaned up. *QuadCountinteger Number of frames in enemy.png. Defaults to 1 *NoSpriteSetsboolean Graphic wi...") Tag: rte-wysiwyg |
(Basic style set up.) Tags: Visual edit apiedit |
||
Line 1: | Line 1: | ||
Currently copied shamelessly straight from the source. Needs to be cleaned up. |
Currently copied shamelessly straight from the source. Needs to be cleaned up. |
||
+ | "integer": 2 |
||
⚫ | |||
+ | "float": 0.2 |
||
⚫ | |||
+ | "boolean": true/false |
||
− | *AnimationTypetext Type of animation. |
||
+ | "string": "text" |
||
⚫ | |||
+ | "array": [value, value] |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
+ | *"animationType": {{Key|string}} Type of animation. |
||
⚫ | |||
⚫ | |||
− | **QuadNointeger Frame to use. Defaults to 1 |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
*DontMirrorboolean Graphic will not get mirrored when moving left |
*DontMirrorboolean Graphic will not get mirrored when moving left |
||
*SpawnOffsetXdecimal (blocks) X-offset from block (in-editor spawn placement or center of ancestor) |
*SpawnOffsetXdecimal (blocks) X-offset from block (in-editor spawn placement or center of ancestor) |
Revision as of 10:47, 22 July 2017
Currently copied shamelessly straight from the source. Needs to be cleaned up.
"integer": 2 "float": 0.2 "boolean": true/false "string": "text" "array": [value, value]
- "quadCount": integer Number of frames in enemy.png. Default: 1
- "noSpriteSets": boolean Graphic will not be vertically split for the 4 spritesets. Default: false
- "animationType": string Type of animation.
- AnimationStart integer first 1-indexed frame from the quads used in normal-state animation
- AnimationFrames integer number of frames used in normal-state animation
- AnimationSpeed decimal (seconds/frame) frame duration in seconds
- AnimationSpeed decimal (seconds) Time between each mirror of the image
- QuadNo integer Frame to use. Defaults to 1
- frames
- mirror
- none
- DontMirrorboolean Graphic will not get mirrored when moving left
- SpawnOffsetXdecimal (blocks) X-offset from block (in-editor spawn placement or center of ancestor)
- SpawnOffsetYdecimal (blocks) Y-offset from block (in-editor spawn placement or center of ancestor)
- Width = 1decimal (blocks) Width of the entity box. This allows collisions to happen correctly
- Height = 1decimal (blocks) Height of the entity box. This allows collisions to happen correctly
- OffsetXdecimal (pixels) X-Offset for the image
- OffsetYdecimal (pixels) Y-Offset for the image
- QuadCenterXdecimal (pixels) X-Center of quads for rotation
- QuadCenterYdecimal (pixels) Y-Center of quads for rotation
- CustomScissordecimal array (blocks) Only draw parts of an enemy. The coordinates are set from top-left of the enemy's block and in blocks.
Interaction
- SpeedX = 0decimal (blocks/second) Horizontal speed
- SpeedY = 0decimal (blocks/second) Vertical speed
- Gravitydecimal (blocks/second2) Negative vertical acceleration
- Lifetimedecimal (seconds) Lifetime before this enemy is killed
- Staticboolean Object won't move or be affected by gravity (better performance)
- SpawnSoundstring Sound that gets played when this enemy is created
- NotKilledFromBlocksBelowboolean Will not die if on a block that gets hit by Mario from below
- JumpsFromBlocksBelowboolean Will jump if on a block that is hit by Mario from below
- MakesMarioStarboolean Makes Mario starred on contact
- RemoveOnMarioContactboolean Will get removed when Mario touches it
- DontMirrorboolean Graphic will not get mirrored when moving left
- Activeboolean Object is updated and can collide (Usually true!)
- Categoryinteger
- Maskboolean array Array of categories masked with this enemy. If enemy.mask[otherenemy.category] is true, these 2 won't collide.
- Portalableboolean Whether the enemy goes through portals. Defaults to true
- Killsboolean Whether Mario dies upon any contact with this enemy's entity box
- KillsOnSidesboolean Whether Mario dies upon contact with the sides of this enemy's entity box
- KillsOnBottomboolean Whether Mario dies upon contact with the bottom of this enemy's entity box
- KillsOnTopboolean Whether Mario dies upon contact with the top of this enemy's entity box
- KillsEnemiesboolean Kills other enemies on contact
- KillsEnemiesAfterPortalboolean Turns on KillsEnemies after going through a portal
- NoCollideStopsboolean Whether this enemy continues motion after collision (useful with bullets for example)
- EmancipateCheckboolean Whether this enemy is emancipated by emancipation grills
- AutoDeleteboolean Enemy will be auto deleted if too low or behind the screen
- LaserResistantboolean Makes this enemy immune to lasers
- ResistsFireboolean Makes this enemy immune to Mario's fireballs
- ResistsStarboolean Makes this enemy immune to starred Mario
- ResistsSpikesboolean Makes this enemy immune to spikes (tile property)
- Bouncesboolean Whether this enemy will bounce every time it hits the floor
- BounceForcedecimal (blocks/second) How strong each bounce will make the enemy fly up
Stomp
- StompComboSuppressorboolean These enemies won't add to the player's combo of jumping on top of many enemies in a row
- Stompableboolean Whether this enemy can be stomped
- StompAnimationboolean Whether the enemy changes to stompedframe when stomped
- StompAnimationTimedecimal Duration of StompedFrame
- StompedFrameinteger 1-indexed frame used when stomped
- KilledByBoxesboolean Makes this enemy stompable by cubes (doesn't require Stompable to be true)
Shell
ShellAnimalboolean Whether this enemy can retract into a shell:
- SmallMovementtext When stomped and a ShellAnimal, enemy will change to this enemy type
- SmallSpeeddecimal (blocks/second) Speed when getting kicked or changing directions
Spawning
If SpawnsEnemytext has a value, then this enemy will spawn that enemy according to the following parameters:
- SpawnEnemyDelaysdecimal array (seconds) A list of delays from which a random one is chosen every time
- ThrowQuadOffsetinteger How much to add to the used quad (If your usual cycle is 1-2-1-2 and you want it to be 3-4-3-4 for the throwing, this is 2!) - this means the throw animation is of the same format as the normal animation
- ThrowPrepareTimedecimal Amount of time before the actual throw that the throwquad is used
Possible ways to set the speed of spawned enemies
Expand
- Simple speed
- SpawnEnemySpeedXdecimal (blocks/second) X-Speed of spawned enemies
- SpawnEnemySpeedYdecimal (blocks/second) Y-Speed of spawned enemies
- Random speed (Can be random for hor and simple for ver for example)
- SpawnEnemySpeedXRandomStartdecimal (blocks/second) Minimum value of horizontal speed (negative for left)
- SpawnEnemySpeedYRandomStartdecimal (blocks/second) Minimum value of vertical speed
- SpawnEnemySpeedXRandomEnddecimal (blocks/second) Maximum value of horizontal speed
- SpawnEnemySpeedYRandomEnddecimal (blocks/second) Maximum value of vertical speed
- Towards nearest player
- SpawnEnemyTowardsPlayerboolean Override child SpeedX and SpeedY
- SpawnEnemySpeeddecimal (blocks/second) Set child SpeedX and SpeedY accordingly
Movement
Expand all
- none
- truffleshuffle
Moves left and right. Think Goombas.**TurnAroundOnCliffboolean Whether horizontal speed is reversed upon arrival on cliff
- TruffleshuffleSpeeddecimal (blocks/second) Speed of horizontal movement
- TruffleshuffleAccelerationdecimal (blocks/second2 ???) Acceleration of horizontal movement
- piston
Goes out and in and out and in. Think piranha plants.**PistonDistXdecimal Horizontal displacement of piston in blocks
- PistonDistYdecimal Vertical displacement of piston in blocks
- PistonSpeedXdecimal Horizontal speed
- PistonSpeedYdecimal Vertical speed
- PistonExtendTimedecimal Self explanatory
- PistonRetractedTimedecimal Self explanatory
- DontPistonNearPlayerboolean Self explanatory
- DontPistonDistdecimal Piston won't extend (but retract!) if player is this near
- InactiveOnRetractedboolean Whether the enemy loses spawn and kill properties while retracted
- follow
Follows Mario. Think Lakitu.**followspacedecimal (blocks) The enemy will try to stay inside this many blocks from the player
- DistanceTimedecimal Multiplied with the player speed to estimate where the player will be in this many seconds, that position is actually used then
- shell
Slides all over the place. Think stomped Koopas.**WakesUpboolean Whether this enemy returns to initial state
- ResetTimedecimal (seconds) How long until this enemy wakes up from its shell
- WiggleTimedecimal (seconds) How long before waking up the enemy will wiggle
- WiggleDelaydecimal (seconds) Time between each wiggler
- ChaseMarioOnWakeupboolean Whether the enemy might walk right if Mario is to its right on wake up
- squid
Moves down first, then towards player and up. Think those squids.**SquidFallSpeeddecimal Speed at which this enemy moves down (Phase 1)
- SquidXSpeeddecimal Speed at which this enemy moves right and left (Phase 2)
- SquidUpSpeeddecimal Speed at which this enemy moves up (Phase 2)
- SquidAccelerationdecimal (blocks/second2) How fast the enemy accelerates
- SquidDownDistanceblocks How far the enemy falls down
- SquidHorDistanceblocks How far the enemy goes left/right
- rocket
Shoots up, falls down, repeat. Think those fire things in the castle.**RocketDistanceblocks How high this enemy will get shot up every time
Goes up and down within a margin. Think Cheep Cheep.**VerticalWiggleDistanceblocks How far this enemy will wiggle downwards
- VerticalWiggleSpeeddecimal (blocks/second) How fast this enemy wiggles up and down
Alesan99's enemy.lua
ADDED: "givecoinwhenstomped": boolean (gives coin when stomped) ADDED: "givecoinwhenshot": boolean (gives coin when shot) ADDED: "followspeed": decimal (how fast the enemy will follow you(if movement is set to "follow")) ADDED: "shotjumpforce": decimal (shot jumpforce duh) ADDED: "shotspeedx": decimal (shot speedx) ADDED: "fallswhenstomped": boolean (falls when stomped, even if it has a stomped frame) ADDED: "health": integer (health, decreased when shot or stomped) ADDED: "customtimer": array (put arrays in the array, the first slot is the delay, the second one is the action, the third one are the arguments) ACTIONS "bounce" "playsound" "setframe" "set[PARAMETER HERE]" ADDED: "chasetime": decimal (chase mario after a x seconds (like hammer bros in SMB)) ADDED: "chasespeed": decimal ADDED: "breaksblocks": boolean ADDED: "breakblockside": string (what side to break) ADDED: "spawnsenemyrandoms": array (spawns a random enemy) ADDED: "flyingtime": decimal ADDED: "flyingdistance": decimal ADDED: "reflects": boolean (bounces off of tiles) ADDED: tranformtriggers: "rightcollide", "leftcollide", "ceilcollide", "globalcollide", "collide", "death", "shot", "collidewith" .. enemyname ADDED: movements: "flyvertical", "flyhorizontal" (flying koopas) FIXED: dontpistondist not working ---------------------------------------------------- ADDED "shothealth": integer ADDED "stomphealth": integer ADDED "transformtriggerobjectcollide": string (transforms when it collides with an object) ADDED "transformtriggerenemycollide": string (transforms when it collides with an enemy) ADDED "playerneardist": integer (enemy will transform when player is this near (horizontal)) ADDED "playerneardist": array (same as above, but you can select a region. set up array like this: [x, y, width, height]) ADDED "staticIfSeen": boolean (becomes static when player faces the enemy) ADDED "staticIfNotSeen": boolean (opposite of above) ADDED "rotatetowardsplayer": boolean (faces player in all directions) ADDED "nofollowspeedup": boolean (enemy the enemy's movement is "follow" it won't speed up when the player is far) ADDED "transformsintorandoms": array ADDED "transformpassedparameters": array (parameters that get passed on once the enemy transforms) ADDED customtimer actions: "reverse[PARAMETER HERE]" (turns positive to negative and negative to positive) "add[PARAMETER HERE]" "multiply[PARAMETER HERE]" ADDED transformtriggers: "lifetime", "playernear", "playernotnear", "seen", "notSeen" FIXED collide with specific entity transform trigger FIXED enemy being visible for one frame after it transformed (You won't have to make an empty frame anymore, Baf). REMOVED transformtriggers: "collidewith"