-
Notifications
You must be signed in to change notification settings - Fork 0
ABS Script Actions (SAction)
ABS Script Actions (SActions) are powerful shortcuts for script calls that allow you to create complex behaviors and actions within the Alpha ABS Z plugin. They provide a simple, standardized way to trigger various game events, effects, and state changes.
🎯 Easy to use: Simple text-based commands that can be used in multiple contexts
🔗 Versatile: Works in Event Comments, Enemy Parameters, and Script Calls
🚀 Multiple Actions: Chain multiple actions together (since v0.10.3)
📡 Network Support: Compatible with multiplayer functionality
🥇 Direct Usage: Since version 0.8, you can call SActions directly in Events using Script calls User API
⚡ Multiple Actions: Since version 0.10.3, use multiple actions in one line, separated by commas
Use SActions in Event Comments for automatic triggers. See Extra Events Comments
<onVectorHit:an_138> # Play animation 138 when any projectile hits event
<onVectorHit_44:ce_2> # Start common event 2 when projectile with skill ID 44 hits event
<onStart:sw_10_true,vr_5_1> # Turn on switch 10 and set variable 5 to 1 when event starts
Configure enemy behaviors. See ABS Enemies Settings
<onDeath:an_33> # Play animation 33 when enemy dies
<onSeeTarget:ba_1,se_Alert> # Show balloon and play sound when enemy sees target
<onHit:ef_shake_5> # Shake enemy when hit
Execute SActions programmatically with optional delays
uAPI.scriptAction("ba_1", this, 100); // Play Balloon animation 1 above this Event after 100ms delay
uAPI.scriptAction("an_138,se_Bell1", this); // Play animation and sound immediately
uAPI.scriptAction("ss_A_true,ce_5", null); // Multiple actions without character referenceFormat: action1,action2,action3
Execution: Actions are executed in sequence, left to right
an_138,ss_A_true # Play animation 138 and turn on self switch A
ce_2,sw_43_true,vr_10_5 # Start common event 2, turn on switch 43, set variable 10 to 5
ef_shake_10,se_Bell1_90 # Shake character for 10 frames and play bell sound at 90% volume
| Action | Syntax | Description | Examples |
|---|---|---|---|
| Self Switch | ss_SWITCH_VALUE[_EVID] |
Toggle self switches for events |
ss_A_true - Turn on self switch Ass_B_false - Turn off self switch Bss_C_true_5 - Turn on self switch C for event ID 5 |
| Global Switch | sw_ID_VALUE |
Control global game switches |
sw_43_true - Turn on switch 43sw_222_false - Turn off switch 222 |
| Variable | vr_ID_VALUE |
Set variable values |
vr_54_100 - Set variable 54 to 100vr_11_0 - Reset variable 11 to 0 |
| Action | Syntax | Description | Examples |
|---|---|---|---|
| Common Event | ce_ID[_this] |
Start common events |
ce_43 - Start common event 43ce_11_this - Start as part of current event |
| Map Event | ev_ID |
Start specific map events |
ev_5 - Start event 5 on current map |
| Action | Syntax | Description | Examples |
|---|---|---|---|
| Animation | an_ID[_EVID|_X_Y] |
Play database animations |
an_140 - Play on current characteran_120_12 - Play on event ID 12an_55_10_20 - Play at map coordinates (10,20) |
| Sound Effect | se_NAME[_VOLUME_PITCH] |
Play sound effects |
se_Bell1 - Play Bell1 at default volumese_Alert_80_120 - Play Alert at 80% volume, 120% pitch |
| Balloon | ba_NUMBER[_EVID] |
Show balloon icons |
ba_1 - Show balloon 1 on current characterba_3_4 - Show balloon 3 on event ID 4 |
| Action | Syntax | Description | Examples |
|---|---|---|---|
| Shake | ef_shake_TIME[_EVID] |
Make character shake |
ef_shake_10 - Shake current character for 10 framesef_shake_15_3 - Shake event ID 3 for 15 frames |
| Shatter | ef_shatter_DX_DY[_EVID] |
Create shatter effect |
ef_shatter_4_4 - Shatter current characteref_shatter_6_6_2 - Shatter event ID 2 |
| Action | Syntax | Description | Examples |
|---|---|---|---|
| Enemy Parameter | ap_PARAM_VALUE[_EVID] |
Change enemy AI parameters |
ap_viewRadius_6 - Set view radius to 6ap_teamId_2_12 - Set team ID to 2 for event 12 |
| Global Skill | es_OWNER_TEAM_SKILL[_TARGET] |
Execute ABS skills |
es_0_-1_303 - Execute skill 303 on selfes_0_0_304_10_20 - Execute at coordinates (10,20)es_0_1_300_0 - Execute on player |
| Add State | as_STATEID[_EVID] |
Apply states to characters |
as_43 - Add state 43 to current characteras_12_5 - Add state 12 to event ID 5 |
| AnimaX Action | ax_NAME[_EVID] |
Trigger AnimaX animations |
ax_Attack - Play Attack animationax_Skill_34 - Play Skill animation on event 34 |
- No target: Action applies to the current character/event
- _EVID: Action applies to event with specified ID
- _0: Action applies to the player character
- _X_Y: Action applies at map coordinates
-
true:
true,1,on,yes(case-insensitive) -
false:
false,0,off,no(case-insensitive)
Available parameters match those in ABS Enemies Settings:
-
viewRadius,returnRadius,teamId,notAgressive -
noMoveInBattle,noApproach,heavy - And more...
- OWNER: Character ID who "owns" the skill (0 = event/current character)
- TEAM: Team ID for targeting (-1 = self, 0 = player team, 1+ = enemy teams)
- SKILL: Database skill ID to execute
<onDeath:an_33,se_EnemyDie,sw_10_true> # Death sequence with animation, sound, and flag
<onSeeTarget:ba_1,ap_viewRadius_8> # Alert behavior when spotting player
<onHit:ef_shake_5,se_Hit> # Hit reaction with shake and sound
<onTouch:sw_5_true,ce_10,an_50> # Activate switch, start event, show animation
<onAction:vr_10_1,se_Switch,ef_shake_3> # Increment counter, play sound, shake
<onVectorHit:ef_shatter_4_4,se_Break> # Break effect when hit by projectile
<onVectorHit_25:as_12,an_65> # Apply poison state when hit by skill 25
// In enemy onSeeTarget parameter:
"ba_1,ap_viewRadius_10,es_0_1_45,se_Alert_90"
// Show alert balloon, increase view range, cast spell, play alert sound// In switch/lever event:
"vr_15_1,sw_20_true,ce_5,an_75_10_15,se_Mechanism"
// Set puzzle state, activate switch, start cutscene, show animation at coordinates, play sound// You can check variables/switches in Common Events called via ce_ action
// This allows for complex conditional logic beyond simple SActions❌ Action not executing
- Check syntax: ensure underscores are used correctly
- Verify IDs: make sure event/switch/variable IDs exist
- Check context: some actions only work in specific contexts
❌ Self switch not working
- Ensure switch letter is uppercase (A, B, C, D)
- Check if event ID is specified correctly
- Verify the event exists on the current map
❌ Animation not playing
- Confirm animation ID exists in database
- Check if target character/coordinates are valid
- Ensure character is visible on screen
❌ Sound not playing
- Verify sound file exists in audio/se folder
- Check volume/pitch values (0-100 for volume, any positive number for pitch)
- Ensure file name matches exactly (case-sensitive)
⚡ Multiple Actions: While powerful, avoid excessive chaining in frequently-called events
⚡ Network Play: All SActions are automatically synchronized in multiplayer
⚡ Error Handling: Invalid actions are logged to console but won't crash the game
✅ Use meaningful delays with uAPI.scriptAction() for cinematic sequences
✅ Combine related actions in single SAction lines for cleaner event code
✅ Test thoroughly especially when using multiple actions or complex parameters
✅ Comment your usage in events for future reference
📚 Related Documentation:
🎮 Demo Project: See map SActions for working examples
This guide covers Alpha ABS Z version 0.10.3+. Some features may not be available in earlier versions.