Makeing a "Befriend/Mercy" skill thing

TheZoruaGAmer

Villager
Member
Joined
Apr 11, 2016
Messages
8
Reaction score
0
First Language
English
Primarily Uses
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
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
29,197
Reaction score
6,758
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.
 

TheZoruaGAmer

Villager
Member
Joined
Apr 11, 2016
Messages
8
Reaction score
0
First Language
English
Primarily Uses
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
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
29,197
Reaction score
6,758
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.
 

TheZoruaGAmer

Villager
Member
Joined
Apr 11, 2016
Messages
8
Reaction score
0
First Language
English
Primarily Uses
@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.
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:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
29,197
Reaction score
6,758
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:

TheZoruaGAmer

Villager
Member
Joined
Apr 11, 2016
Messages
8
Reaction score
0
First Language
English
Primarily Uses
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:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
29,197
Reaction score
6,758
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.
 

TheZoruaGAmer

Villager
Member
Joined
Apr 11, 2016
Messages
8
Reaction score
0
First Language
English
Primarily Uses
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.
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.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
29,197
Reaction score
6,758
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.
 

TheZoruaGAmer

Villager
Member
Joined
Apr 11, 2016
Messages
8
Reaction score
0
First Language
English
Primarily Uses
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.
ok... i wasnt shure where it went
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Wasting so much time trying to get a sprite behavior to work. I feel like banging my head against a wall.
Well... it’s been a real pain in the IRS today. :/
My kitty still young (3-4 months), I think I could teach her some funny tricks... like: "Play dead-ly good music for my games"
Here's a quality DPS class idea: The Beekeeper, who uses the "Bees!!" skill to attack and poison enemies.
Please don't create long, boring cutscenes in which characters do nothing but stand around talking.

Forum statistics

Threads
94,274
Messages
919,548
Members
123,996
Latest member
popogui
Top