Eclipse - Free 2D Mmorpg Maker
March 12, 2010, 05:29:41 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   chat Login Register  
 
 
   
 
collapse

* No Spam Or Websites

Refresh History

* Recent Topics

Scripting by waltercross
[Today at 05:26:24 AM]


Let's make a spritesheet! by Jungletoe
[Today at 04:25:34 AM]


Lets make a tileset! by Jungletoe
[Today at 04:19:06 AM]


The Rules of the Game by Godlord
[Today at 03:59:08 AM]


Im fairly new to this. by lc3
[Today at 03:23:04 AM]


Pointing something out... by Ddunit - Aizawa
[Today at 02:29:15 AM]


Pokemon Cyrus Online 2010 by Ddunit - Aizawa
[Today at 01:57:07 AM]


My first graphic by мсичġġєт
[Today at 01:39:55 AM]


Rate this image! by мсичġġєт
[Today at 01:36:52 AM]


Last one to post Wins by In7el3ct
[Today at 12:28:59 AM]


* Who's Online

  • Dot Guests: 30
  • Dot Hidden: 1
  • Dot Users: 8
  • Dot Users Online:

Site Author : Topic: Certain NPC sound and spell anim on death  (Read 150 times)
0 Members and 1 Guest are viewing this topic.
November 30, 2009, 11:04:23 PM
Member
**
User No : 11164
Posts: 77
  • View Profile
So it'd be nice if you can choose which NPC when dying gives off a sound and a spell animation. Something like
NPCnumber (2,3,4)
PlaySound (Soundfile.wav)
SpellAnim

I'm not a scripter but that would make bosses abit easier to identify.

Logged
December 01, 2009, 06:49:12 PM
Global Moderator
Teh Uberleet
*
User No : 13370
Posts: 2845
  • View Profile
With your old OnNPCDeath:

Code: (vb) [Select]
Sub OnNPCDeath(Index, Map, NPCNum, NPCIndex)
Call BattleMsg(Index, "You killed a " & GetNpcName(NPCNum) & ".", BRIGHTRED, 0)
MapNpcNum = GetMapNpcNumber(Map, NPCNum)
Select Case NPCNum
Case 1
Call SpellAnim(SpellNum, Map, GetNpcX(Map, MapNpcNum), GetNpcY(Map, MapNpcNum))
Call PlaySound(index, "filename.wav")
End Select
End Sub

Change SpellNum to the number of the spell to play.

Case 1 means NPC number one, if you don't make a case then no animation or sound will play.

If you wanted to add another:

Code: (vb) [Select]
Case N
Call SpellAnim(SpellNum, Map, GetNpcX(Map, MapNpcNum), GetNpcY(Map, MapNpcNum))
Call PlaySound(index, "filename.wav")

Change SpellNum to the spell number, again.
Logged

December 02, 2009, 01:06:14 AM
Member
**
User No : 11164
Posts: 77
  • View Profile
Works like a charm, thanks a lot.
Logged
December 02, 2009, 06:00:12 PM
Global Moderator
Teh Uberleet
*
User No : 13370
Posts: 2845
  • View Profile
No problem :D.
Logged

 


Powered by MySQL Powered by PHP Powered by SMF 2.0 RC3 | SMF © 2006–2010, Simple Machines LLC
SimplePortal 2.3.1 © 2008-2009, SimplePortal
Valid XHTML 1.0! Valid CSS!
Page created in 0.317 seconds with 28 queries.