- Joined
- Dec 8, 2015
- Messages
- 25
- Reaction score
- 2
- First Language
- English
- Primarily Uses
Hey everyone!
I saw a post about this through google, but there wasn't actually anyone saying how it's done, just that it's possible. I'm super new with Javascript, and I can't seem to wrap my head around the eventing to make it work.
I figure that you would need to make a place to store the percentage, and then use an event to see if it was stolen successfully, then just add the gold to the party through the events.
But I can't seem to figure out how to make that work. Could someone explain it for me, and anyone else who doesn't really get it? I don't even need a code or anything, just if I could get it explained a bit better, that would help so much.
Thanks in advance!
EDIT: Nevermind, my brain had the dumbs. I totally figured it out, but it steals the gold even if I miss the attack. I have more work to do, but it is at least doing what I want right now.
For those that do need the help, this is all I had to do:
1. Make a common event, I called mine "Steal Gold"
2. Make a variable called something (Steal Gold), and set it to 0.
3. Have the variable generate a random number, I used 1 and 20
4. Then, create a conditional branch to see if the number is greater than or equal to your bottom number.
5. If it is, add the gold. If it's not, then don't.
6. Create an "effect" in the skill that calls the common event.
It looks like I have to check and make sure the attack is successful. Or, make the attack and the chance of the effect activating the same.
EDIT AGAIN: So, that's not working. I'm stealing the gold and not doing any damage which is awesome, but it still triggers when I miss the attack. Or at least the damage pop-up is telling me I'm missing. I've got it set in the event to tell me when I fail the check for the event, and sometimes it will go through while the attack won't. It's aggravating and really, really weird.
LAST EDIT: Just turned the attack's success rate to 100%. My brain is totally against me today. D: But, all is resolved.
I saw a post about this through google, but there wasn't actually anyone saying how it's done, just that it's possible. I'm super new with Javascript, and I can't seem to wrap my head around the eventing to make it work.
I figure that you would need to make a place to store the percentage, and then use an event to see if it was stolen successfully, then just add the gold to the party through the events.
But I can't seem to figure out how to make that work. Could someone explain it for me, and anyone else who doesn't really get it? I don't even need a code or anything, just if I could get it explained a bit better, that would help so much.
Thanks in advance!
EDIT: Nevermind, my brain had the dumbs. I totally figured it out, but it steals the gold even if I miss the attack. I have more work to do, but it is at least doing what I want right now.
For those that do need the help, this is all I had to do:
1. Make a common event, I called mine "Steal Gold"
2. Make a variable called something (Steal Gold), and set it to 0.
3. Have the variable generate a random number, I used 1 and 20
4. Then, create a conditional branch to see if the number is greater than or equal to your bottom number.
5. If it is, add the gold. If it's not, then don't.
6. Create an "effect" in the skill that calls the common event.
It looks like I have to check and make sure the attack is successful. Or, make the attack and the chance of the effect activating the same.
EDIT AGAIN: So, that's not working. I'm stealing the gold and not doing any damage which is awesome, but it still triggers when I miss the attack. Or at least the damage pop-up is telling me I'm missing. I've got it set in the event to tell me when I fail the check for the event, and sometimes it will go through while the attack won't. It's aggravating and really, really weird.
LAST EDIT: Just turned the attack's success rate to 100%. My brain is totally against me today. D: But, all is resolved.
Last edited by a moderator:
