Tech Lounge > Programming

** E2 HELP **

(1/1)

WillyWonka:
So i have this E2 that i need help with,
Problem:
1. When someone else talks it resets the song.

@name Songs
@inputs 
@outputs String:string
@persist
@trigger
runOnTick(1)

if(first()){
    runOnChat(1)
    MODE=0
    THIS=entity()
    ME=THIS:owner()
}
if (chatClk()){
    Str1 = owner():lastSaid()
    if (Str1:left(1) == "a"){hideChat(1)}
    if (Str1 == "!play-ravebreak"){soundPlay(0,0,"ravebreak.mp3") , String="RaveBreak"}
    if (Str1 == "!play-suitsong"){soundPlay(1,0,"music/hl2_song23_suitsong3.mp3") , String="SuitSong"}
if (Str1 == "!end-song") {(soundStop(0,0)) , soundStop(1,0) , Sting="None"}
}

if (chatClk()){
    Str2 = owner():lastSaid()
    if (Str2 == "!run-test") {String="Self Test Activated"}
    if (Str2 == "!run-test") {L1 = 1000}
}

Thanks and please do not steal this e2!

Krasher:
in your chatClk()

add owner()

like this:

if(chatClk(owner()){

Tomcat:

--- Quote from: Кгձรհεг on July 16, 2010, 08:20:14 AM ---in your chatClk()

add owner()

like this:

if(chatClk(owner()){

--- End quote ---


or you let tomcat  add arrays for players who can control it

Navigation

[0] Message Index

Go to full version