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 → Cog Request:
Cog Request:
2003-08-19, 6:09 AM #1
I am requesting a Cog, i need the cog to Play 1 sound when the host dies, and for it to play a different sound for when the Client dies.

------------------
Dark-Vane
[This message has been edited by Vane (edited Tuesday, 1212).]
There's only one thing that im scared of, and it's Pixels... THERE EVERYWHERE!!!! AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH! *runs through a wall*
2003-08-19, 8:02 AM #2
Hi there [http://forums.massassi.net/html/smile.gif]

I could be incorrect about the flag settings here, but I don't see why this cog shouldn't work in theory (I don't have multiple machines to test it on though...) [http://forums.massassi.net/html/redface.gif]

Apologies if this doesn't work accurately - I specialise more in single-player than multi-player...

Code:
##
#
# 00_deathSoundsMulti.COG
#
# This script will play a sound when a player dies.
# The sound played depends on whether the player is the host or client.
#
# Set verbose=1, if you want to see print out messages.
# (More for test purposes than anything else...)
#
# This COG script is NOT supported by LucasArts or LEC.
#
# Permission is granted to use this script by the author, as long as credit
# is provided in the readme file for any add-on levels that use this script.
#
#
# E-mail: lucky_jackpot@hotmail.com
# [RJS]
#
##


flags=0x240

symbols

    message startup
    message killed

    sound   hostSnd
    sound   clientSnd

    int     verbose=0

end

#===
#===
#===

code

startup:

    if (verbose)
    Print ("Start-up MSG !!!");

    if (!IsMulti() )    // If not multi-player
        return;         // exit...

    if (IsMulti() ) {
        if (verbose)
        Print ("Correct Setting");
    }

    return;

#.......

killed:

    if (IsServer() ) {      // Host
        if (verbose)
        Print ("Host Death Sound");
        PlaySoundThing (hostSnd, GetSenderRef(), -1, -1, -1, 0);
    }
    else {      // Client
        if (verbose)
        Print ("Client Death Sound");
        PlaySoundThing (clientSnd, GetSenderRef(), -1, -1, -1, 0);
    }

    return;

#.......

end


Hope this helps, but feel free to post back as to whether this is successful or not because I'm curious as to the flag settings... [http://forums.massassi.net/html/wink.gif] [http://forums.massassi.net/html/biggrin.gif]

------------------
Are you feeling lucky, cuz if you are, get your hands off me... [http://forums.massassi.net/html/wink.gif]

"Life is mostly froth and bubble,
But two things stand in stone,
Kindness in another's trouble,
Courage in your own"
("Ye Wearie Wayfarer" - by Adam Lindsay Gordon)

[This message has been edited by lucky_jackpot (edited August 19, 2003).]
"lucky_jackpot is the smily god..." -gothicX
"Life is mostly froth and bubble, but two things stand in stone,
Kindness in another's trouble, courage in your own"
- "Ye Wearie Wayfarer"
|| AI Builder: compatible with both JK & MotS || My website ||

↑ Up to the top!