how is this not working?
Author | Topic: how is this not working? |
---|---|
Agent
Member # 27
|
written Sunday, July 8 2007 12:03
Profile
How is this not killing my final character in a party of four? pchar = 0, and, if I'm correct, a while statement runs until the phrase is false. Posts: 1233 | Registered: Wednesday, October 3 2001 07:00 |
Infiltrator
Member # 148
|
written Sunday, July 8 2007 12:47
Profile
It looks like it is the AND in the if statement. Are you sure you want to be checking that ALL those spaces are blank, or at least one? -------------------- My ego is bigger than yours. Posts: 480 | Registered: Thursday, October 11 2001 07:00 |
Agent
Member # 27
|
written Sunday, July 8 2007 13:28
Profile
The script is trying to say that unless a character is in one of those spaces he's going to die. Though you brought up a different problem that I hadn't noticed, this does not answer my original question. EDIT: Why didn't Jeff include a single call that checked to see if a SPECIFIC character was in a spot? Now I'm going to have to manipulate this script more than I wanted to. My head hurts. [ Sunday, July 08, 2007 13:35: Message edited by: Enraged Slith ] Posts: 1233 | Registered: Wednesday, October 3 2001 07:00 |
Agent
Member # 27
|
written Sunday, July 8 2007 13:47
Profile
Here's another problem. Though it gave me a bad head ache, I finally got this section of script to work. Essentially, what this script is supposed to do is: if this creature spots your party, he runs away to a new hiding spot (with a failsafe for making sure it isn't the same spot as last time.) Unfortunately, the failsafe isn't working, and the creature reappears the next turn (over and over and over and over.) If someone could get back to me on this question and the one above, I would appreciate it. EDIT: It isn't shown here but I've assigned all my variables. Town Script: Creature Script: [ Sunday, July 08, 2007 13:48: Message edited by: Enraged Slith ] Posts: 1233 | Registered: Wednesday, October 3 2001 07:00 |
Shaper
Member # 7472
|
written Sunday, July 8 2007 13:59
Profile
Homepage
I can't help with the problem you're currently experiencing, but I can tell you that creating the message after killing the character is not a good idea. I've found that BoA gets rather unreliable when it tries to retrieve data on a character that's either dead or doesn't exist. EDIT: It appears that, if get_ran turns out 58, and the creature's last hiding spot was 58, it'll change it to 59, which isn't supported. I'm not sure if that's what's causing the glitch you're experiencing, but it's still worth correcting. [ Sunday, July 08, 2007 14:07: Message edited by: Nioca ] -------------------- Scenarios need reviews! Please rate these scenarios at the CSR after playing them! Amnesia • Witch Hunt • Where the Rivers Meet • Foul Hordes Posts: 2686 | Registered: Friday, September 8 2006 07:00 |
Agent
Member # 27
|
written Sunday, July 8 2007 14:54
Profile
Thanks for the catch, I fixed that up. Script is doing some weird things now after tweaking. First, the failsafe works only on occasion. Second, after a certain point when I kill the creature, he keeps reviving over and over and over and over. I used no create creature calls so this seems pretty strange to me. Posts: 1233 | Registered: Wednesday, October 3 2001 07:00 |
Infiltrator
Member # 5576
|
written Sunday, July 8 2007 15:00
Profile
Homepage
I think that maybe one problem is with the creature script-terrain script interaction; the way that the creature script sends information to the town script is by setting flags 2,15 and 2,14. It appears that you are trying to make flag 2,15 be set 1 higher each time; but this won't work because the3 first time, t is 0, gets incremented to 1, and the flag is set to the value, but because the creature erases itself, the new one is back to having t=0, so the exact same result will be given each time. So, maybe the solution is to avoid using the local variable t, and instead to use only an SDF to store the count. I don't see a way that this would cause the creature always appear in the same place, though. -------------------- Überraschung des Dosenöffners! "On guard, you musty sofa!" Posts: 627 | Registered: Monday, March 7 2005 08:00 |
Agent
Member # 27
|
written Sunday, July 8 2007 15:30
Profile
I have ten creatures using the same creature script (all are hidden but one of course). Does the t variable only apply to each individual creature rather than them all as a whole? Posts: 1233 | Registered: Wednesday, October 3 2001 07:00 |
Shaper
Member # 7472
|
written Sunday, July 8 2007 15:46
Profile
Homepage
Variables are unique to each and every creature, whether or not the script is the same. If you want to have a variable that is non-unique to a set of creatures, you'll have to use a flag. [ Sunday, July 08, 2007 15:53: Message edited by: Nioca ] -------------------- Scenarios need reviews! Please rate these scenarios at the CSR after playing them! Amnesia • Witch Hunt • Where the Rivers Meet • Foul Hordes Posts: 2686 | Registered: Friday, September 8 2006 07:00 |
Lifecrafter
Member # 6193
|
written Sunday, July 8 2007 16:14
Profile
Homepage
I think this is what you were going for with the first script: Checks for each PC whether or not he's on one of the safe spots, and kills him if he isn't. As for the creature script, I'm not patient enough to debug that. But at first glance I'd say the problem is, as Niemand said, with the variable. Remember that whenever you erase the creature and activate a new group the value T is lost. Use a flag. -------------------- Guaranteed to blow your mind. Frostbite: Get It While It's...... Hot? Posts: 900 | Registered: Monday, August 8 2005 07:00 |
Agent
Member # 27
|
written Sunday, July 8 2007 20:47
Profile
Thanks for the help everyone, I finally fixed every problem. The side effects I got along the way were pretty weird and amusing though. This scenario should be ready for beta testing tomorrow or the next day. I'll need help converting everything to be Mac compatable. [ Sunday, July 08, 2007 20:54: Message edited by: Enraged Slith ] Posts: 1233 | Registered: Wednesday, October 3 2001 07:00 |