Trying to make a trap skill

Discussion in 'RGSS3 Script Requests' started by Maximo, Dec 22, 2016.

  1. Maximo

    Maximo Warper Member

    Likes Received:
    First Language:

    I have a character with a skill called "Black hole", which is a trap that can be set into the selected target for 1 turn [There's a 50% of chance that the trap can be set]. During the turn if the selected enemy attacks the actor who used the skill, the black hole will absorb the attack and explode, causing heavy damage (Based on the actor's attack) to the enemy. If the enemy attacks another actor or does not attack, then the black hole will simply dissappear.

    I've created a state for the black hole, but I don't know what to do after that. Is there a way to make the enemy receive damage based on the actor's attack when attempting to attack only the actor who used the skill?
    Last edited by a moderator: Dec 22, 2016
  2. Andar

    Andar Veteran Veteran

    Likes Received:
    First Language:
    Primarily Uses:
    states cannot check for targeting, they are always passive results.

    Theoretically you can try to do this by a troop event checking all combinations of enemies, states and targets - but that would be extremely complex.

    The only realistic way is to use a script that checks if an actor is attacked and reacts to that - there are some scripts like that, but I don't have links ready and most are more like a "thorn"-barrier, causing damage to all attackers instead of only those with a state.

    I've moved this thread to Script Request. Please be sure to post your threads in the correct forum next time. Thank you.

Share This Page