- Current Location:
- PureZC
- » PureZC Forums
- » Scripts
- » Power Bracelet (Liftable)
Power Bracelet (Liftable)
Overview
Creator:
Emily
Updated: 17 Feb 2022
Tags:
2.55,
Weapon,
Item
Downloads: 101
|
Download Example (6 MB) |
Information
A power bracelet item script that allows you to lift pots/rocks/etc, and throw them.
Description Setup Reviews Comments
- Spawn items:
- Either under the object when you lift it, or falls out of it when you break it; configurable per-combo
- Either from a dropset, or pre-set items
- Either every time, or as a "Special Item"; i.e. Heart Piece under a rock. This mode will set Screen->State[ST_SPECIALITEM] when you pick it up, so no other special item can be on the same screen.
- Hurt enemies:
- Deal damage with the thrown object; amount configurable per-combo
- Carry across screen borders (toggle-able per-bracelet item)
- Carry in water (toggle-able per-bracelet item)
- Drop what you are holding when hit (toggle-able per-bracelet item)
- GFX/SFX:
- Use a "Weapons/Misc" sprite upon the object breaking (configurable per-combo)
- Play an SFX when it breaks (configurable per-combo)
- Undercombo- either use the screen's undercombo, or use the next combo in the list (toggle-able per combo)
- Lift from layers (which is TEMPORARY layer alteration; as one would want for this!)
Credit to ywkls for inspiration/idea (and 'ComboInFront(int dir)'), and to Moosh for 'scrollingDraws.zh', which I modified for this.
Note: The modified scrollingDraws.zh is no longer present as of V2.1.0. Scrolling draws still work, using 2.55's 'Game->Scrolling[]' system.
Changelog:
02-Nov-19 - V1.0.0 uploaded
03-Nov-19 - V1.0.1 - Lift/Throw SFX (d6/d7) added
22-Nov-19 - V2.0.0 - Overhaul. Change setup. Add lifting from layers.
24-May-20 - V2.1.0 - Remove the modified 'scrollingDraws.zh' code, use 'Game->Scrolling[]' from 2.55 instead.
12-Feb-22 - V2.1.1 - Minor update: Clarify instructions, add Player Tile Modifier option
DISCLAIMER: If you encounter any issues with using this script, PLEASE DO LET ME KNOW SO I CAN FIX IT.
Only std.zh is required.
CONSTANTS:
CB_LIFT - the button to use to lift stuff (default CB_A)
CB_THROW - the button to use to throw stuff (default same as CB_LIFT)
HELD_DRAW_LAYER - the layer to draw the held object to (default 3)
WEAPON_DRAW_LAYER - the layer to draw the thrown weapon to (default 3)
TILE_INVIS - An invisible tile (default 20)
LW_THROWN - the LW_ type to use for the weapon (default LW_SCRIPT1)
SHADOW_SPRITE - the Weapons/Misc sprite to use for the shadow (default 50)
TOP_GRABBABLE_LAYER - the highest layer that combos can be grabbed from
USE_PTM - Whether or not to include the Player Tile Modifier in custom player sprites.
ITEM:
For EACH COMBO:
CONSTANTS:
CB_LIFT - the button to use to lift stuff (default CB_A)
CB_THROW - the button to use to throw stuff (default same as CB_LIFT)
HELD_DRAW_LAYER - the layer to draw the held object to (default 3)
WEAPON_DRAW_LAYER - the layer to draw the thrown weapon to (default 3)
TILE_INVIS - An invisible tile (default 20)
LW_THROWN - the LW_ type to use for the weapon (default LW_SCRIPT1)
SHADOW_SPRITE - the Weapons/Misc sprite to use for the shadow (default 50)
TOP_GRABBABLE_LAYER - the highest layer that combos can be grabbed from
USE_PTM - Whether or not to include the Player Tile Modifier in custom player sprites.
ITEM:
- Set the flag "Constant Script" (Flag 15)
- Assign the script to the "Action" slot
- Set up parameters:
- d0 - the Step of the thrown lweapon (movement speed)
- d1 - the initial Jump of the thrown lweapon (vertical movement)
- d2 - Lift Delay (the number of frames it takes to lift an object)
- d3 - Custom animation:
- To use no custom animation, set this to 0
- To set up a custom animation:
- Create 16 combos in a row.
- First 4: Up,Down,Left,Right - standing still
- Second 4: Up,Down,Left,Right - walking
- Third 4: Up,Down,Left,Right - swimming
- Fourth 4: Up,Down,Left,Right - Lifting
- Set d3 to the upper-left combo (up-facing, standing still), and this will be used.
- UseSound: The value set as the sound will be used for the 'Lift' SFX. The next sound after this (n+1) will be used for the 'Throw' SFX.
- Flags
- Flag 0: Can carry while swimming
- Flag 1: Will drop held object if hit
- Flag 2: Can carry across screens
For EACH COMBO:
- Set up type/flag
- EITHER set the type to 'Bush->Next', OR set the inherent flag to 'Pot, Liftable (Scripted)', 'Pot, Slash or Lift (Scripted)', or 'Rock, Lift Normal (Scripted) to have the combo be liftable.
- If you instead set the inherent flag to 'Rock, Lift Heavy (Scripted)', it will only be liftable if the bracelet item has a 'Power' higher than '1'.
- Set up Attributes
- Attributes[0] - Weapons/Misc sprite to use on breaking the object
- Attributes[1] - Damage done by the thrown object
- Attributes[2] - If positive, the item ID to drop when broken. If negative, the item dropset to drop an item from when broken.
- Attributes[3] - SFX to play when broken
- Set up Misc Flags
- Flags[5] - If this is checked, the next combo in the list will be used instead of the undercombo. (Bush->Next combotypes always do this)
- Flags[6] - If this is checked, the item will only be dropped once (as the screen's Special Item).
- Flags[7] - If this is checked, the item will drop when the object breaks, instead of when you lift it
No reviews found!
SparksTheUnicorn
Edited 24 May 2020 - 01:10 AM
Can this script safely be used along side Moosh's normal Scrollingdraws.z script and/or any scripts that rely on it. Or, if I only use the scrollingdraws.z included in your script, will that still work with the scripts form Moosh that may require scrolling draws?