![]() |
The Black Wyrm's Lair Terms of Use |
![]() ![]() ![]() ![]() |
![]() |
![]()
Post
#1
|
|
![]() The Tactician ![]() Distinguished Developer Posts: 7793 Joined: 1-December 05 ![]() |
This tutorial contains a false comment inside one of its codes:
QUOTE This is a technique used to account for the pause between spellcasting. It cuts off spellcasting actions when they cannot be performed,[...] So, you might have the following block: IF !GlobalTimerNotExpired("castnattack","LOCALS") HaveSpellRES("spwi999",Myself) THEN RESPONSE #100 SetGlobalTimer("castnattack","LOCALS",6) // Timer always set to 6, as that is the duration of the pause SpellRES("spwi999",LastSeenBy(Myself)) END Well, this is wrong! As I have mentioned elsewhere the duration of the pause is NOT 6. I don't know how many modders might have been misled by the fasle comment inside the code which says "as that is the duration of the pause", but it's now perhaps the time to let people know that it is false. The duration of the pause varies from spell to spell (it's not 6 for every spell). I know the exact duration of the pause for each and every spell, but the easiest way to implement the correct duration of the pause is to use "SpellNoDec" instead of "ForceSpell" as it is implemented in Improved Anvil. -------------------- Improved Anvil
![]() Cheating is not confined to using external software or the console commands. Abusing the flaws and limitations of the game engine to do something that a human Dungeon Master would not accept or allow is cheating. |
|
|
![]() |
![]()
Post
#2
|
|
![]() The Tactician ![]() Distinguished Developer Posts: 7793 Joined: 1-December 05 ![]() |
I performed a test (with spells with long spell casting times) and it seems that Creepin's comment is right. If the timer is set before the spell-casting action, it works fine. Thank you, Creepin!
However, the duration of the pause is not 6 (as claimed in the tutorial), so yes, the comment in the tutorial needs to be edited, because, as it stands, it is false and misleading (though the code works). Still, using "SpellNoDec" instead of "ForceSpell" has several other advantanges (as I have mentioned in the SpellNoDec thread here) as well as the fact that we will NOT need the timer either. So, to optimize his tutorial, Sim would need to edit his comment inside the code and would also need to add the possibility of using "SpellNoDec" along with all of its advantages over "ForceSpell". -------------------- Improved Anvil
![]() Cheating is not confined to using external software or the console commands. Abusing the flaws and limitations of the game engine to do something that a human Dungeon Master would not accept or allow is cheating. |
|
|
![]() ![]() |
![]() |
Lo-Fi Version | Time is now: 20th April 2025 - 01:47 PM |