 |
Castle Paradox
|
View previous topic :: View next topic |
Author |
Message |
H-Bomb
Joined: 24 Apr 2007 Posts: 11
|
Posted: Wed May 02, 2007 7:17 pm Post subject: Ending Map Autorun Loops Correctly |
|
|
I have a loop that starts running when the map is loaded (map autorun), the script loops while a specific tag is off, and I have a step on NPC that sets that tag on and terminates the loop. An indentical NPC shares the tile with every door on the map, the idea was to terminate the autorun loop, so it wouldn't pile-up under the loop for the next map, but it doesn't work, because it appears to read the NPC, then the door, then the last "final" tick of the loop once it has reached the next map. Where it is terminated.
If that map has an autorun script of it's own, it never gets to the last tick, and the old code never closes properly. It still functions fine, but if the player created enough dead scripts, I figure the game will lock up.
Does anyone know a good way to fix this? I need the script to terminate instantly or between maps, as opposed to what is is doing now, terminating 1 click into the next map (or not at all if another loop autoruns on the next map). I plan on using this script for several maps, so I'd prefer to avoid coordinate specific or map specific commands, or anything that would have to be massproduced, unless I absolutely have to. |
|
Back to top |
|
 |
H-Bomb
Joined: 24 Apr 2007 Posts: 11
|
Posted: Wed May 02, 2007 7:45 pm Post subject: |
|
|
here is a code example:
Code: |
set tag (188,Off)
if (check tag (187)) then (
first
#Loop#
while(check tag (188) == Off) do,begin
wait for hero (me)
Thing1
Thing2
Thing3
Thing4
end)
resume player
end
|
And The NPC:
Code: |
wait for hero (me)
set tag (188,On)
end
|
The part of the process you can't see in this code is the door placed directly under the NPC. |
|
Back to top |
|
 |
H-Bomb
Joined: 24 Apr 2007 Posts: 11
|
Posted: Thu May 03, 2007 2:44 am Post subject: |
|
|
I messed around with this script a while longer, I found out that if a text box is right before it, it will create a delay, and also it works fairly well triggering it with a touchable NPC placed next to the entrances (chasing) instead of an autorun loop. Both of these methods work, but are kinda mickey-moused, so if anyone has a cleaner method, I'd love to hear it.  |
|
Back to top |
|
 |
Artimus Bena Admiral

Joined: 17 Aug 2004 Posts: 637 Location: Dreamland.
|
Posted: Thu May 03, 2007 8:56 pm Post subject: |
|
|
James replied to a similar request in your post in the hamsterspeak suggestion thread; try that.
break, and exit script I believe it was. _________________ SACRE BLEU!
|||Compositions!
|||Eldardeen Soundtrack!
|||Red Mercury! |
|
Back to top |
|
 |
H-Bomb
Joined: 24 Apr 2007 Posts: 11
|
Posted: Fri May 11, 2007 9:12 am Post subject: |
|
|
is there some kinda updated plotscript dictionary or hamsterspeak specification I can use for converting my code to work in the nightly? I have been using the current stable build, which is really old at this point, the only thing I can think of is to use the readme to figure out all the changes in syntax, which sounds like hell on earth. I'm am not sure which commands need to be changed, I know alot (if not all) of the define commands are broken now, so if there's some kinda reference to help with the conversions, that would be awesome. I apologize if the answer is obvious, it just seems there are alot of official OHR sites, which gets confusing. Thanks for the help, I'm excited for the transfer as this will fix all of my current known bugs. |
|
Back to top |
|
 |
Bob the Hamster OHRRPGCE Developer

Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
|
Posted: Fri May 11, 2007 9:31 am Post subject: |
|
|
H-Bomb wrote: | is there some kinda updated plotscript dictionary or hamsterspeak specification I can use for converting my code to work in the nightly? I have been using the current stable build, which is really old at this point, the only thing I can think of is to use the readme to figure out all the changes in syntax, which sounds like hell on earth. I'm am not sure which commands need to be changed, I know alot (if not all) of the define commands are broken now, so if there's some kinda reference to help with the conversions, that would be awesome. I apologize if the answer is obvious, it just seems there are alot of official OHR sites, which gets confusing. Thanks for the help, I'm excited for the transfer as this will fix all of my current known bugs. |
Old style defines are not broken. You can mix old-style defines with new style. You can find a guide to the new syntax at 'How do I convert my scripts from old to new syntax?'
As for new commands, http://HamsterRepublic.com/ohrrpgce/docs/plotdict.xml is kept up-to-date with the latest nightly.
Also be sure to check out the timer commands such as 'plot:set timer' and friends, since many complex scripting problems can be made simpler with them. |
|
Back to top |
|
 |
H-Bomb
Joined: 24 Apr 2007 Posts: 11
|
Posted: Sat May 12, 2007 5:04 pm Post subject: |
|
|
Great! Thank you very much! |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Sat May 12, 2007 6:38 pm Post subject: |
|
|
Looks like we ought that make that clearer in whatsnew. _________________ "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
|