Discussions of the design and development of in-game content.
Moderator: Team Members
-
Scatman
- Retired
- Posts: 1688
- Joined: Wed Apr 16, 2008 5:44 am
- EQ2Emu Server: Scatman's Word
- Characters: Scatman
- Location: New Jersey
Post
by Scatman » Wed Aug 13, 2008 7:21 am
There are certain spells that have pre-requisites before they are executed, like spells that require you to be behind your target, in stealth before you can begin casting, or even both.
The cast() function is executed after the casting time is over right? So spells with these pre-reqs won't even let the casting time begin before checking that the player's current state satisfies those pre-reqs.
Is there a function that I'm not aware of that is run before casting time begins or can this be done in the cast() function?
-
LethalEncounter
- Team: Zombie
- Posts: 2717
- Joined: Wed Jul 25, 2007 10:10 pm
Post
by LethalEncounter » Wed Aug 13, 2008 2:41 pm
I can add a function that would be called before the spell is cast that will return true or false depending on whether the spell should be cast. What would you like the function name to be?
-
Scatman
- Retired
- Posts: 1688
- Joined: Wed Apr 16, 2008 5:44 am
- EQ2Emu Server: Scatman's Word
- Characters: Scatman
- Location: New Jersey
Post
by Scatman » Wed Aug 13, 2008 3:50 pm
Hmm I am not very clever when it comes to naming functions

. Pre() or before() hehe I dunno

you or someone else might want to decide.
Thanks LE! That'll make stealth attacks and back attacks much better!
-
John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
-
Contact:
Post
by John Adams » Wed Aug 13, 2008 5:23 pm
Maybe a "CheckPreReqs()" kinda thing. I'm sure there could be tons of uses for this, like checking available power/hp/conc before you even get to Cast. Not that it matters, though.
Plus, customization, of course.
-
Scatman
- Retired
- Posts: 1688
- Joined: Wed Apr 16, 2008 5:44 am
- EQ2Emu Server: Scatman's Word
- Characters: Scatman
- Location: New Jersey
Post
by Scatman » Wed Aug 13, 2008 5:45 pm
Actually it does matter. On live, it will do a test to make sure you are behind/flanking/have enough power/arent dead/etc before the casting time begins AND after the casting time finishes. Trust me, I know

damn flanking and stealth spells

-
John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
-
Contact:
Post
by John Adams » Wed Aug 13, 2008 6:37 pm
John Adams wrote:like checking available power/hp/conc before you even get to Cast. Not that it matters, though.
This was the context, not what you said. Your requirements are valid.
-
Scatman
- Retired
- Posts: 1688
- Joined: Wed Apr 16, 2008 5:44 am
- EQ2Emu Server: Scatman's Word
- Characters: Scatman
- Location: New Jersey
Post
by Scatman » Wed Aug 13, 2008 9:37 pm
Oops

I am gullible what can I say!
Who is online
Users browsing this forum: No registered users and 0 guests