Groovy event recipes...

#5
Here is a good one...

A warp spell. How I achieved this, is I wanted a warp spell you get first thing in the game. I actually wanted the cost of the spell to be extremely high, so you can't cast it for a good while. But as it turns out that is sort of a requirement (well if you want to lean on the safe side -- at least the cost of the spell needs to be not too close to other spells -- and if it isn't the most costly spell you'd need another IF statement)

Anyway, how this works is...

1) You'll need an "Always On" event and two Counters...

2) First you place the players current MP in the first counter. There is an instruction to do this.

3) You test if the second counter is greater than the first counter (don't worry that the second counter is not at first set, cause 0/the default is alway less)

4) IF so, then you subtract the first counter from the second counter (the second counter now knows how much magic you just spent)

5) IF the magic is greater than slightly less than the cost of your teleport spell (factor in any possible magic regeneration going on.) ...then you can safely warp the player to where the spell takes them. At this point you could toss in another IF block and make sure that the MP spent is less than any spell you have that costs more than the teleport.

6) END IF and END IF again.

7) Now copy what's in the first counter into the second counter.

Tested, and works. And if it doesn't, I probably missed something in the explanation because I'm not looking at the event setup atm. Just use common sense before asking for clarification please Twisted


*SPOILER*
For my DoM remix project...
I call my spell Song of Sonellian, which is found on a dragon pedestal (dead fountain with the base underground) near Sonellian's grave. The spell cost 120 and takes you back to Sonellian's grave, which is just across from the players home base place and where the game effectively starts (after a playable intro) ...you have to walk back to the base until you have 120mp though. After you do, it's pretty easy to just warp between there and healing tree and recoup your 120mp (if you're cheap like that)
*SPOILER*

PS: If you want to do this for multiple spells, you can do them all in the same event with some thought. Also the first IF probably isn't necessary, but I just did it to avoid negative numbers (cause I dunno if they're allowed) and add some logic to the explanation.
Reply



Messages In This Thread
Groovy event recipes... - by HolyDiver - 2009-05-02, 08:46 AM
Groovy event recipes... - by dmpdesign - 2009-05-02, 06:52 PM
Groovy event recipes... - by HolyDiver - 2009-05-02, 09:48 PM
Groovy event recipes... - by HolyDiver - 2009-05-03, 10:38 PM
Groovy event recipes... - by HolyDiver - 2009-05-04, 05:19 AM
Groovy event recipes... - by HolyDiver - 2009-05-26, 06:04 PM
Groovy event recipes... - by HolyDiver - 2009-05-26, 11:39 PM
Groovy event recipes... - by dmpdesign - 2009-05-27, 02:06 PM
Groovy event recipes... - by HolyDiver - 2009-05-27, 10:07 PM
Groovy event recipes... - by dmpdesign - 2009-05-28, 03:48 AM
Groovy event recipes... - by HolyDiver - 2009-05-28, 08:29 AM
Groovy event recipes... - by dmpdesign - 2009-05-28, 01:05 PM
Groovy event recipes... - by HolyDiver - 2009-05-28, 07:03 PM
Re: Groovy event recipes... - by lavaelf1024 - 2009-10-16, 04:30 PM



Users browsing this thread:
1 Guest(s)