![]() |
|
[Shell] Flashing color screens and random percentages for RPG help? - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [Shell] Flashing color screens and random percentages for RPG help? (/showthread.php?tid=5330741) |
Flashing color screens and random percentages for RPG help? - cogama - Jul 7, 2016 Hey Batch guys, I'm on vacation right now with nothing to do but make a random batch RPG for educational purposes. I can post the code if needed but it's kind of irrelevant to my question, which is, how can I make it so after a scene of, lets say, a bear comes and attacks you, Your CMD flashes black and white or black and purple etc. very fast, maybe 3 times a second? •so far for this I'm thinking of something like this Code ...So far for this I Also, in a fight scene, how can I give the option to fight with a 30% win chance and a 60% chance of running away, and a 10% chance of using a trap? I have no idea how to accomplish this, a reference for how to do this would be great. (P.S. Sorry if this is random, I don't expect anybody to just write all the code for me, referencing me to a source is fine, or tips) * - einstein1969 - Jul 8, 2016 For sleep a lot use "pathping" I can't undestand the second question... * - cogama - Jul 8, 2016 (Jul 8, 2016 02:33 AM)einstein1969 Wrote: For sleep a lot use "pathping" I guess I made that complicated, I'm asking how I can make something either happen or not happen based on a percentage like 50% or 75% for example Code *A monster suddenly appears*Where pressing 2 gives a 75% chance of success and 25% chance of failure * - einstein1969 - Jul 8, 2016 You can use the %random% variable to simulate a probability. Code Set P1=25 RE: Flashing color screens and random percentages for RPG help? - cogama - Jul 8, 2016 (Jul 8, 2016 05:30 AM)einstein1969 Wrote: You can use the %random% variable to simulate a probability. Thanks a lot buddy, although I'm trying to figure out how to effectively implement this into my game So here's my code Code :2nd_sceneSo I need to make it so when I press 1 at that scene it will be successful or not, when I do that with your code it just closes the window |