Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ SMAUG ➜ SMAUG coding ➜ Variable carry over

Variable carry over

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Elvshire   (1 post)  Bio
Date Thu 06 Mar 2003 05:16 PM (UTC)
Message
Before I even begin, I'd like to point out that I'm a kid and have virtually no real programming experience, so some of my questions may seem pretty basic. Well, here goes:

I'm trying to find a way to make a spell "chant" or put out a message, wait a second or two, put out another message and fire the spell. I was able to implement this with word of recall, as it simply points the the do_recall function by doing the following:

ch_ret spell_word_of_recall( int sn, int level, CHAR_DATA *ch, void *vo )
{
	send_to_char( "You raise your arms in the air and begin to weave an intricate pattern of magic.\n\r", ch );
	add_timer ( ch , TIMER_DO_FUN , 3 , do_recall , 1 );
    return rNONE;
}

What I'm trying to do now is make a spell that will do the same thing, but damage an opponent. In this attempt I created an equivalent skill to the spell and made the timer target that skill. The difficulty that I am having is getting the victim to deal damage to to carry over from the spell to the skill... can anyone help me here?
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #1 on Thu 06 Mar 2003 10:42 PM (UTC)
Message
This question gets asked many times - "how do I pause the output to the player?".

It isn't easy, because a genuine pause in the server would pause all players, not just that one. You need to do something like you posted, add a timer. Without knowing the details of what you want, you could do your own function, like do_recall, to do what you want, and add a timer to call it in a second or so.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


9,779 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.