 |
Castle Paradox
|
View previous topic :: View next topic |
Author |
Message |
no_shot Surpasses you in poetical prowess

Joined: 28 Apr 2003 Posts: 300 Location: On the road to perfection.
|
Posted: Sat Jan 05, 2008 6:26 pm Post subject: My script has ghosts in it! |
|
|
1. I made a script that has a bunch of npcs walk somewhere, and then teleports to another map, via the "wait for npc(x)" command (I also tried it with "wait for all")...but, as the NPCs arrive at their destination, nothing happens; they just sit there, and the game freezes. The thing that really throws me for a loop is that it works sometimes, but not others. It's the exact same code!!! Why does it do this to me?
2. Player advances a text box, whereupon they are teleported to a "dark" place on the map (black tiles, for black background effect so I don't have to make a black screen just for a backdrop, which I ended up having to do anyways) and shown another text box. In theory, it works fine. In practice, it goes to the black area and freezes. No text box. No nothing...Just perpetual darkness.
(Note: The original file was made with an older version, and then updated when I loaded it into the latest one. Could this be what's causing everything to mess up?) _________________ Play Horrible Fantasy NOW! |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Sun Jan 06, 2008 3:43 am Post subject: |
|
|
Good grief! I haven't heard of anything like that. So this was with Ubersetzung? Could you please attach your game/testcase to a 'bug report', or just email it to someone (I'll take it). _________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
no_shot Surpasses you in poetical prowess

Joined: 28 Apr 2003 Posts: 300 Location: On the road to perfection.
|
Posted: Sun Jan 06, 2008 7:33 pm Post subject: |
|
|
Hey, didn't you help me out with this exact same script three years ago? Anyways, I've played around with it, and figured out it had to do with one script in particular: the autorun script on the map.
Code: | plotscript, guards, begin # this is the map's autorun script
# if I omit this script, or make it so the map doesn't autorun it, the bottom script works as it should (mostly)
while (current map == 3) do,
(
if ((hero y (me) >> 6), and, (hero y (me) << 9)) then,
(
if (((npc x (1) << hero x (me)), and, (NPC direction (1) == east)), or, ((npc x (1) >> hero x (me)), and, (NPC direction (1) == west))) then,
begin
suspend player
show text box (22)
wait for text box
use door (2) # this part works fine
show text box (61)
wait for text box
game over
end
)
if ((hero y (me) >> 12), and, (hero y (me) << 15)) then,
(
if (((npc x (2) << hero x (me)), and, (NPC direction (2) == east)), or, ((npc x (2) >> hero x (me)), and, (NPC direction (2) == west))) then,
begin
suspend player
show text box (22)
wait for text box
use door (2) # as does this part
show text box (61)
wait for text box
game over
end
)
wait(1) #haaa, this was thanks to you, remember?
)
end
plotscript, badending, begin #this runs when you pick a certain choice from a text box
teleport to map (3, 6, 16)
suspend player
suspend obstruction
suspend box advance
# guard tripping alarm sequence, removed because it doesn't affect the
# problem
use door (2) # door 2 leads to another spot on the same map (the dark
# area I mentioned) Once it delivers the player to this spot, game
# actvity ceases for some reason. If I take the use door command out,
# things continue as they should...except it looks funny cause everyone
# is still standing there when it should be a black screen
resume box advance
show text box (61)
wait for text box
game over
end |
Something tells me that autorun scripts in this version are like music: it continues without reloading if it's the same one. Maybe after using the door, the badending script is aborted. It worked with previous versions; I know, I playtested it until I puked.
I guess I've conquered #2. I'll have to find a way around this obstacle, shouldn't be too hard. Still working on isolating the other problem, though. And, thanks again for your help...again! _________________ Play Horrible Fantasy NOW! |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Tue Jan 08, 2008 5:42 am Post subject: |
|
|
no_shot wrote: | Something tells me that autorun scripts in this version are like music: it continues without reloading if it's the same one. Maybe after using the door, the badending script is aborted. It worked with previous versions; I know, I playtested it until I puked. |
Scripts continue without reloading if they are the topmost script, and if "Permit double triggering of scripts" is not set. By topmost, I mean that they are the active script, and are halted on a wait command (not a wait in some script they called).
I'm not aware of any reason that it should have changed.
But wait, I'm confused: when badending is run, the teleporttomap should trigger the guards autorun script, which will block the rest of badending (because it ought to continue looping until you leave the map).
However, '' . bug_title('430') . '' might be occurring here. This is fixed in the nightlies - you could download them and try it out to check. However, the fix for bug 430 breaks certain games that depend on it, and will have to be undone before the next release.
Another thing you could try: press F10 and check what scripts are running, and in what order, when the game freezes. _________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|