Easygoing Eyebeast Xaiya Posted August 11, 2008 Share Posted August 11, 2008 Is there anyway to change a PC's action points in battle (during its turn)? If there isn't, can I end the turn? I've searched through the appendix, but I haven't found anything. Maybe I'm missing something? Quote Link to comment Share on other sites More sharing options...
Well-Actually War Trall Niemand Posted August 11, 2008 Share Posted August 11, 2008 I'm not entirely sure that you mean a PC, but deduct_ap() both works on NPCs when called form inside their creature scripts and on PCs when called from the code of a custom item ability. As far as I know, there's no way to deduct AP from a PC during combat when it, say, steps in a certain location, or something like that. Quote Link to comment Share on other sites More sharing options...
Well-Actually War Trall Ishad Nha Posted August 11, 2008 Share Posted August 11, 2008 You could experiment with varying their speed status with a call that affects statuses. Haste/Slow is status 3. Quote Link to comment Share on other sites More sharing options...
Easygoing Eyebeast Xaiya Posted August 11, 2008 Author Share Posted August 11, 2008 Well, I want to be able to take a couple AP points away from when a state is activated, but if I can't I already figured something different I could do. Quote Link to comment Share on other sites More sharing options...
Understated Ur-Drakon Celtic Minstrel Posted August 11, 2008 Share Posted August 11, 2008 Unless deduct_ap() will work, which I doubt, I don't think there's any way to do this. Quote Link to comment Share on other sites More sharing options...
Understated Ur-Drakon Nioca Posted August 11, 2008 Share Posted August 11, 2008 Well, you could always use set_mobility(); to totally immobilize the character. Unfortunately, I think that's the best available to you, and it doesn't shut down a character's turn, it just prevents them from moving anywhere. Quote Link to comment Share on other sites More sharing options...
Easygoing Eyebeast Xaiya Posted August 11, 2008 Author Share Posted August 11, 2008 Well, I decided to do something different. Unfortunately, it is acting funky. It keeps asking me if I want to use it, and only one of the control panels did something. Click to reveal.. Code: beginstate 11; reset_dialog(); add_dialog_str(0,"There is a control panel here, would you like to use it?",0); add_dialog_choice(0,"No."); add_dialog_choice(1,"Use control panel."); if ((get_flag(4,11) == 0) && (run_dialog(1) == 2)){ print_str_color("The northwest control panel glows.",3); play_sound(45); set_height(11,9,8); set_flag(4,11,1); } if ((get_flag(4,11) == 1) && (run_dialog(1) == 2)){ print_str("Nothing happens."); } if ((get_flag(4,11) == 2) && (run_dialog(1) == 2)){ print_str_color("The northwest control panel glows.",3); play_sound(45); set_height(11,9,7); set_flag(4,11,3); } if ((get_flag(4,11) == 3) && (run_dialog(1) == 2)){ print_str("Nothing happens."); } if ((get_flag(4,11) == 4) && (run_dialog(1) == 2)){ print_str_color("The northwest control panel glows.",3); play_sound(45); set_height(11,9,6); set_flag(4,11,5); } if ((get_flag(4,11) == 5) && (run_dialog(1) == 2)){ print_str("Nothing happens."); } else block_entry(1); break; beginstate 12; reset_dialog(); add_dialog_str(0,"There is a control panel here, would you like to use it?",0); add_dialog_choice(0,"No."); add_dialog_choice(1,"Use control panel."); if ((get_flag(4,11) == 0) && (run_dialog(1) == 2)){ print_str("Nothing happens."); } if ((get_flag(4,11) == 1) && (run_dialog(1) == 2)) { print_str_color("The southwest control panel glows.",3); set_flag(4,11,2); } if ((get_flag(4,11) == 2) && (run_dialog(1) == 2)){ print_str("Nothing happens."); } if ((get_flag(4,11) == 3) && (run_dialog(1) == 2)){ print_str_color("The southwest control panel glows.",3); set_flag(4,11,4); } if ((get_flag(4,11) == 4) && (run_dialog(1) == 2)){ print_str("Nothing happens."); } if ((get_flag(4,11) == 5) && (run_dialog(1) == 2)){ print_str("Nothing happens."); } else block_entry(1); break; (The two control panels are in separate locations.) Quote Link to comment Share on other sites More sharing options...
Understated Ur-Drakon Nioca Posted August 11, 2008 Share Posted August 11, 2008 Um, run_dialog() is a call that performs an action (running the parameters of whatever dialog you have set up), not a static call that returns a number. If you want to get what a player did with a dialog choice, have a variable get the value like so: Code: choice = run_dialog(1); Note that choice can be replaced with any variable. Then, instead of: Code: if ((get_flag(4,11) == 1) && (run_dialog(1) == 2)){ You'd use: Code: if ((get_flag(4,11) == 1) && (choice == 2)){ If there proves to be something else wrong with the code, I couldn't find it. No offense, but when your coding style was mangled by UBB, it was like trying to read hieroglyphics. Quote Link to comment Share on other sites More sharing options...
Easygoing Eyebeast Xaiya Posted August 11, 2008 Author Share Posted August 11, 2008 Really? Because I've used it like that before and it works. I'll try that method, though. Quote Link to comment Share on other sites More sharing options...
Understated Ur-Drakon Nioca Posted August 12, 2008 Share Posted August 12, 2008 If the call is only made once, then it can be safely used that way. If the code requires multiple checks, though, it'll fail. Quote Link to comment Share on other sites More sharing options...
Easygoing Eyebeast Xaiya Posted August 12, 2008 Author Share Posted August 12, 2008 I replaced all of the run_dialog with choice, but for some reason nothing is happening except that it is blocking me. Is there something else in there that I screwed up? Quote Link to comment Share on other sites More sharing options...
Understated Ur-Drakon Nioca Posted August 12, 2008 Share Posted August 12, 2008 Make sure that choice = run_dialog(1); is called once before the if statements. Quote Link to comment Share on other sites More sharing options...
Magnificent Ornk nikki. Posted August 13, 2008 Share Posted August 13, 2008 Erm, I almost never use a variable to get something from a run_dialog call. Just typing Code: if(run_dialog(1) == x) {do this} else {do something else.} will work. And I have scenarios to prove it. Quote Link to comment Share on other sites More sharing options...
Well-Actually War Trall Niemand Posted August 13, 2008 Share Posted August 13, 2008 That only works if you have two responses, not three, and makes it more work to change the logic if you want to later. That's is not to say that it isn't a perfectly good method, but it's good to be aware of the more general approach. Quote Link to comment Share on other sites More sharing options...
Magnificent Ornk nikki. Posted August 15, 2008 Share Posted August 15, 2008 Okay then. Code: if(run_dialog(1) == 1) {do x} else (if(run_dialog(1) == 2) {do y} else {do z}} Three choices. As I said, I never use a variable for dialog boxes. It's such a waste. Quote Link to comment Share on other sites More sharing options...
Unflappable Drayk Lazarus. Posted August 15, 2008 Share Posted August 15, 2008 You just ran that box twice. Quote Link to comment Share on other sites More sharing options...
Magnificent Ornk nikki. Posted August 15, 2008 Share Posted August 15, 2008 Get lost, Slack. I know I did. Did you not play TV? Yeah, so I've never called a three-choice box. I prefer to force the player/party to my way of thinking. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.