-
Notifications
You must be signed in to change notification settings - Fork 19
Landmines and Traps
Demo project: Demo Link
See Enemy Spawning
This event used in <landmineEventId:X>
ABS parameter (see below)
First Event Page
Event must have minimum 2 pages. First page is empty. Second page starts when landmine activated
Below Character
Second Event Page
Self Switch A
In second page you can add some logic, but i prefer add command Erase Event
for delete landmine from map
Also, set event trigger: Parallel
or Autorun
Example: In Demo project, landmine event with ID 4 uses logic with 3 event pages
This skill uses by landmine, when it's activated
This skill used in <landmineSkillId:X>
ABS parameter (see below)
ABS:0 skill with some special settings:
<radius:X>
- landmine damage radius (optional), by default 1 - damage only who step on
Occasion
- Never - try to not use landmine skills like skills for actors or enemies
Scope
:
- 1 Enemy - this landmine against enemies only
- 1 Ally - this landmine against player and allies
- All enemies - this landmine against all (player, allies, enemies)
Also, recommended set parameters MP cost
, TP cost
, speed
to 0
This skill uses by player or enemy for placing landmines
ABS parameters for landmine place skill
REQUIRED:
-
<landmineSkillId:X>
- X - landmine skill ID (see above) -
<landmineEventId:X>
- X - landmine event ID on SpawnMap (see above)
OPTIONAL: -
<landmineTime:X>
- X - time in frames for landmine activation (60 = 1 second) -
<landmineTimeOnly:Z>
- if 1 - landmine not been activated by step on it, only by timer (default 0)
- Place landmine below skill user
Skill type ABS:0
Scope
: The user
- Place landmine on distance (under cursor)
Skill type ABS:2
Scope
: 1 Enemy
<range:X>
- X - max distance to place (in map cells)
Using uAPI script calls you can place landmines on map, activate it, set timers, delete it. It's allow you create some kinds of traps.
uAPI.setLandmine(index, eventId, skillId, x, y);
-
index
- any number -
eventId
- landmine event ID on SpawnMap -
skillId
- landmine skill ID (explosion skill) -
x
andy
- coordinates on map
Example: uAPI.setLandmine(0, 10, 33, 20, 30)
Or, if you want use values from Variable, use $gameVariables.value(number), where number - variable number
Example: uAPI.setLandmine(0, 10, 33, $gameVariables.value(144), $gameVariables.value(254));
uAPI.setTimerForLandmine(index, time, onlyTimerExplosion);
-
index
- number of landmine for which you set the timer -
time
- time in frames (60 = 1 second) -
onlyTimerExplosion
- if true, then landmine will activated only by timer, if false - by timer and step on it
Example: uAPI.setTimerForLandmine(0, 120, false);
uAPI.deleteLandmine(index);
- remove landmine from map (without activation and landmine event run)
uAPI.explodeLandmine(index);
- activate landmine on map (explode and landmine event run)