Makeing a "Befriend/Mercy" skill thing

Discussion in 'Learning Ruby and RGSSx' started by TheZoruaGAmer, Apr 11, 2016.

  1. TheZoruaGAmer

    TheZoruaGAmer Villager Member

    Messages:
    8
    Likes Received:
    0
    First Language:
    English
    Im needing some help with a type of thing


    im working on a "script" useing the skill battle system to beable to locate bolth the enemy ID and the troop enemy ID 


    ive got the enemy id figrued out but i am needing help with the troop enemy id... what i am needing is to find what place is the enemy on the list such as the first slime that is put into battle is id 1 second slime is id 2 so on and so on... and this is needed to beable to set a scrip to mercy the enmy on... any help will be gladly aprecated
     
    #1
  2. Andar

    Andar Veteran Veteran

    Messages:
    27,483
    Likes Received:
    6,131
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    Please give us a description of what you want to do instead of how you want to do this.


    Because if my assumptions are correct, you don't need any script to remove an enemy without killing it, that is one of the default options in the game.
     
    #2
  3. TheZoruaGAmer

    TheZoruaGAmer Villager Member

    Messages:
    8
    Likes Received:
    0
    First Language:
    English
    ok so what i want to do is test for the troop enemy ID so that enemy can have a sertan script to it... what i am haveing trubbles is seting a variable to that one troop it will be easyer to show you in pictures aswell words 


    screenshot.57.png


    the left oen is troop id 1 the right one is troop id 2


    what im trying to do is single one out useing a skill and in the battle box i have the code $game_variables[1]=b.enemy_id;$game_variables[2]=b.enemy_troop_id;0 


    the first part "$game_variables[1]=b.enemy_id;" is to chose what enemy it is (in this case eather one is slime) b.enemy_id;$game_variables[2]=b.enemy_troop_id; this i thought would chose witch one liike if i chose the right one it will set the 2nd varable to 2... but i cant get that code to work... thats what im pisificaly needing help on right now
     
    #3
  4. Andar

    Andar Veteran Veteran

    Messages:
    27,483
    Likes Received:
    6,131
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    @TheZoruaGAmer No, that is again a description of how you want to do something.


    I want to know what the player should see as happening as a result?


    Because I'm pretty sure that you need exactly ZERO code, you only need to use the escape effect to remove the enemy.
     
    #4
  5. TheZoruaGAmer

    TheZoruaGAmer Villager Member

    Messages:
    8
    Likes Received:
    0
    First Language:
    English
    ohh... the player should see (since this is only a test world) if thay chose the second slime thay should see "hello" then after that "hi" as im testing it but in the finished you sould see a choise box dependednt on what enemy you fight and then your option may alow you to mercy them


    and their name be a diffrent collor... and i may need help on that later
     
    Last edited by a moderator: Apr 11, 2016
    #5
  6. Andar

    Andar Veteran Veteran

    Messages:
    27,483
    Likes Received:
    6,131
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    OK, that's a bit more complex - but I would still do it in a different way without using scripts.


    Make an invisible (no icon, no texts) state "targeted for discussions" or however you name it, and apply that state to the target of the skill.


    Then add as a second effect a call common event "discussion".


    In that common event you can make one branch for every enemy checking if it has that state (conditional branch), and if yes have your show choices and show texts and whatevery you want. If you want to spare that enemy, have that common event a force action with the escape skill on that enemy.
     
    Last edited by a moderator: Apr 11, 2016
    #6
  7. TheZoruaGAmer

    TheZoruaGAmer Villager Member

    Messages:
    8
    Likes Received:
    0
    First Language:
    English
    ok ill try that


    after trying that it works but only if one enemy is inflected with it... if it does bolth it kindof causes some probloms... cause a script i am needing to add to witch i completly looked over when doing that... im needing the 2nd one to be set to beable to add a script to set a "can mercy" thing to true. i dont even know if the script will work quite right due to that one item 


    most of the scripts use that enemy troop id code for it... 


    if there is any way to id the serten enemy troop that gets the effect then remove the effect right after that would be a nice fix
     
    Last edited by a moderator: Apr 11, 2016
    #7
  8. Andar

    Andar Veteran Veteran

    Messages:
    27,483
    Likes Received:
    6,131
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    You don't want the enemy ID, you want the enemy index inside the troop - that is something different than the ID. Search for that, I don't know the exact name/code for it.
     
    #8
  9. TheZoruaGAmer

    TheZoruaGAmer Villager Member

    Messages:
    8
    Likes Received:
    0
    First Language:
    English
    found a few things with it


    under Game_Enemy there is index and that matches the description but it dosnt seem to work how i uses it. then the rest all refers to game_troop and that dosnt work either.
     
    #9
  10. Andar

    Andar Veteran Veteran

    Messages:
    27,483
    Likes Received:
    6,131
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    I've moved this thread to Learning RGSS. Please be sure to post your threads in the correct forum next time. Thank you.


    That is the forum where such questions are better placed. Please also give a link to the script you're trying to use as that will determine which data you really need.
     
    #10
  11. TheZoruaGAmer

    TheZoruaGAmer Villager Member

    Messages:
    8
    Likes Received:
    0
    First Language:
    English
    ok... i wasnt shure where it went
     
    #11

Share This Page