Eclipse
January 05, 2009, 07:36:01 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Chat Help Rules Arcade Search Calendar Gallery Login Register  
 
 
 
Recent Topics +-
My Game by grenegg1
Today at 07:34:36 PM

THE Cult by ‪‫‬‭‮‪‫‬‭The Admiral
Today at 07:34:15 PM

Server Issue by Xavi
Today at 07:33:20 PM

Azkanan's Workshop (Graphics) by Devogen
Today at 07:28:02 PM

New DezireSoft forums by The BanHammer! [Thor!]
Today at 07:27:15 PM

Makai Realms by Sʎ|3><(_)z
Today at 07:25:28 PM

Lostica [Project Revamp] by Sʎ|3><(_)z
Today at 07:23:54 PM

Teh Cult by Teh_General
Today at 07:17:35 PM

Phantasy Forum by Sʎ|3><(_)z
Today at 07:16:16 PM

Will do custom graphics using Photoshop (GUI/Banners/Logos/PD Sprites/ect..) by Sʎ|3><(_)z
Today at 07:15:30 PM

Members Online +-
16 Guests, 27 Users
Echo ♥ Pie,
Dr. Who Cares,
‪‫‬‭‮‪‫‬‭The Admiral,
Marsh,
2guns,
Xavi,
Sʎ|3><(_)z,
grenegg1,
Hikaru,
Kreator,
Baron,
Ambard,
karminezr0x,
westin444,
Southern,
Airscar,
shrig94,
Devogen,
The BanHammer! [Thor!],
Simius Cruentus,
dragonlord52,
Keebler Elf,
Niko,
MrAreth,
Syner,
Electrokinesis,
Elixix
Pages: [1]
  Print  
Author Topic: Instrument Script  (Read 1316 times)
0 Members and 2 Guests are viewing this topic.
Lameroth
Active Member
***
Offline Offline

Posts: 316

I own Satan


View Profile Email
« on: March 30, 2006, 10:10:38 AM »

simple: every time u press ctrl it plays a random sound. it only works with the  newest version (beta one for now)

But this after your scripted tiles, if u dont have the atack sub:

Quote

Sub OnAttack(index)
'********************************


Dim randomiser
Dim max
Dim note
Dim player_weapon
Dim weapon_slot

weapon_slot=Int(getplayerweaponslot(index))
player_weapon=Int(Getplayerinvitemnum(index, Int(weapon_slot) ) )

Select Case player_weapon

Case 1

max = Getvar("scripts\guitarsounds.ini", "index", "total_sounds")
randomiser = Int((Int(max) + 1) * Rnd) + 0
If randomiser = 0 Then
randomiser = 1
End If
note = GetVar("scripts\guitarsounds.ini", "sounds", Int(randomiser))
Call PlaySound(index, note)

End Select

End sub

 
in red is the number of the intrument item


now create a ini called guitarsounds.ini and put this on:
Code: [Select]

[INDEX]
total_sounds=6

[SOUNDS]
1=do.wav
2=dosus.wav
3=re.wav
4=resus.wav
5=mi.wav
6=fa.wav
7=fasus.wav
8=sol.wav
9=solsus.wav
10=la.wav
11=lasus.wav
12=si.wav
13=slide.wav


i think its easy to understand: total_sounds are the total of sounds u have in ur SFX folder and u want be able to play.
For each sound u have a number, and write the name of the sound, with the .wav or .midi thing.

for having more than one intrument, edit the case to get the file names from other .ini.

i based in baron's talking weapons script, so hail him


sound effects: u can use mine: http://www.megaupload.com/pt/?d=IXW9E9AU


put them in the SFX folder.

btw, those sounds were made with guitar pro. they are just power chords (most used technique in rock music). but when i get a new guitar cable, ill do some better sounds. :D
Baron
Lord Of Spleens
Administrator
Teh Uberleet
*
Online Online

Posts: 2,735


Genesis CoCreator - Eclipse Evo Developer


View Profile WWW Email
« Reply #1 on: March 30, 2006, 10:12:04 AM »

Thanks for the credit but you worked hard on this :) well done. maybe also rar up your guitar sounds for a downloadable link, and tell people where to put them.
Lameroth
Active Member
***
Offline Offline

Posts: 316

I own Satan


View Profile Email
« Reply #2 on: March 30, 2006, 10:25:24 AM »

damn, html never works with me. added.
Daddy Gnome Draken
THE GNOME KING
Global Moderator
Advanced Member
*
Offline Offline

Posts: 947


Clay Gnome Productions


View Profile WWW Email
« Reply #3 on: March 31, 2006, 02:13:28 AM »

Sweet im going to test this out in a few :)

ill see what i can do with it

*bows* *bows* Im not worthy! *bows* *bows*


<edit> Your link is broken or something for the guitar effects </edit>


<edit again> also where do i stick the first one at bottem of main? </edit again>


<edit once more> I figured it out lol  I also made some guitar things but my webhost wont let me post them /shrug dont know why lol Guys this thing rocks its not exactly what i was looking for but this is even better lol  One Question though Will other players be able to hear the music as well?</edit once more>
Lameroth
Active Member
***
Offline Offline

Posts: 316

I own Satan


View Profile Email
« Reply #4 on: March 31, 2006, 03:49:41 AM »

i ask myself that question. probably not. which sucks.
Baron
Lord Of Spleens
Administrator
Teh Uberleet
*
Online Online

Posts: 2,735


Genesis CoCreator - Eclipse Evo Developer


View Profile WWW Email
« Reply #5 on: March 31, 2006, 09:01:13 AM »

well they would if he had a more advanced scripting knowledge.

Then hed realise he could do a loop through all player index numbers to check for map and play sound based off whether they are on the map to hear it or not.

But I doubt hed have though of doing it like that or posesses the scripting knowledge to do so.
n0madic0debc
Active Member
***
Offline Offline

Posts: 415


View Profile Email
« Reply #6 on: March 31, 2006, 10:01:22 AM »

Wow nice script lameroth your not so lame
Lameroth
Active Member
***
Offline Offline

Posts: 316

I own Satan


View Profile Email
« Reply #7 on: March 31, 2006, 11:35:59 AM »

why no one realises that my name is an irony...
btw, ill record some drum sound in some minutes. and upload them, of course
Daddy Gnome Draken
THE GNOME KING
Global Moderator
Advanced Member
*
Offline Offline

Posts: 947


Clay Gnome Productions


View Profile WWW Email
« Reply #8 on: April 01, 2006, 03:49:50 AM »

how hard will it be to make it where other players can hear on the map your on?
Pages: [1]
  Print  
 
 

Powered by EzPortal
Powered by MySQL Powered by PHP Powered by SMF 2.0 Beta 4 | SMF © 2006–2008, Simple Machines LLC | Sitemap Valid XHTML 1.0! Valid CSS!
Page created in 0.308 seconds with 33 queries.