Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → Need cog for SP......
Need cog for SP......
2003-06-17, 12:57 PM #1
I need a simple cog that goes like this. When a surface is activated, the cell switches and a sound is played. Then there is a delay, and another sound is played. It doesnt reset, after that everything is done.

Thanks in advance, credit will be given...

------------------

Restless 2

Sanctum de la Mort
2003-06-18, 9:43 AM #2
Code:
#=====
# Written By DSLS_DeathSythe
#=====
symbols
#-----
message   activated
surface   switch
sound     act_snd
flex      delay=1.0
sound     delay_snd
int       has_played=0     local
#-----
end
#=====
code
#-----
activated:
  if(has_played == 1) return;
  has_played = 1;
  SetWallCel(switch, 1);
  PlaySoundLocal(act_snd, 1.0, 0, 0x0);
  Sleep(delay);
  PlaySoundLocal(delay_snd, 1.0, 0, 0x0);
return;
#=====
end

that should do it. i made the sound play local so it wont sound like its comming from any directions, want it different just ask.

------------------
Famous last words - "It seemed like a good idea at the time."
Famous last words - "It seemed like a good idea at the time."
2003-06-18, 9:59 AM #3
Ah, I made an error in my description. I need overall 3 sounds, first an acivation sound, then a delay, then a sound, then another delay, then the final sound. Sorry about that...

------------------

Restless 2

Sanctum de la Mort
2003-06-18, 10:45 AM #4
no problem. try this one.
Code:
#=====
# Written By DSLS_DeathSythe
#=====
symbols
#-----
message   activated
surface   switch
sound     act_snd
flex      delay1=1.0
sound     sound1
flex      delay2=1.0
sound     sound2
int       has_played=0     local
#-----
end
#=====
code
#-----
activated:
  if(has_played == 1) return;
  has_played = 1;
  SetWallCel(switch, 1);
  PlaySoundLocal(act_snd, 1.0, 0, 0x0);
  Sleep(delay1);
  PlaySoundLocal(sound1, 1.0, 0, 0x0);
  Sleep(delay2);
  PlaySoundLocal(sound2, 1.0, 0, 0x0);
return;
#=====
end


------------------
Famous last words - "It seemed like a good idea at the time."
Famous last words - "It seemed like a good idea at the time."
2003-06-18, 11:23 AM #5
Thanks, its perfect.

------------------

Restless 2

Sanctum de la Mort

↑ Up to the top!