Author Topic: How would I make a radio with VCE  (Read 571 times)

I know, I could do a relay loop and then
Onrelay - Client - Centerprint - <var:brick:RadioText>

That way it would display what the variable RadioText is.
I was wondering if there was a way so whatever someone types in teamchat becomes RadioText.
I don't know how that would be possible though.
Help.
 :panda:

Are you trying to VCE a rp chat?

No. A radio that displays text that a person says with teamchat.
I saw AI do it on Tezuni's.

That was more than likely a server mod. I don't think this is possible with events.

That was more than likely a server mod. I don't think this is possible with events.
Your wrong.
Not a server mod.
I know.
I saw the events.
Its simple but I can't remember.

It is like two lines.
It was this one output event..

Not sure what you are asking... <var:cl:lastteammsg> might be what you are looking for...

Code: [Select]
0 [000] OnActivate > Self > VCE_StateFunction > "<var:cl:bl_id>" ""
1 [000] OnActivate > Self > VCE_callFunction > "<var:cl:bl_id>" ""
2 [100] OnVariableFunction > Self > VCE_callFunction > "<var:cl:bl_id>" ""
3 [000] OnVariableFunction > Self > VCE_ModVariable > "Client" "msg" "Set" "<var:cl:lastTeamMsg>"
4 [000] OnVariableFunction > Client > VCE_IfVariable > "msg" "==" "<var:cl:lastTeamMsg>" ""
5 [000] OnVariableFalse > Self > VCE_ModVariable > "Brick" "sendMsg" "Set" "<var:cl:msg>"
6 [000] OnVariableFalse > Client > VCE_ModVariable > "msg" "Set" "<var:cl:lastTeamMsg>"
7 [000] OnVariableFalse > Self > setEventEnabled > "8 9" Checked
8 [000] OnVariableFunction > Client > ChatMessage > "<var:br:sendMsg>"
9 [099] OnVariableFunction > Self > setEventEnabled > "8 9" Unchecked

Im pretty sure that would work. Let me break it down:
Lines 0-2: VCE Function loop, which is similar to a relay loop, however it allows for targeting the client without wasting lines on if's, and also loops for each client which starts the loop, unlike relays. It will also only loop once per client (im pretty sure), unlike an If loop.
Lines 3-4: Checks if you've just sent a new team message.
Lines 5-7: If you have, it will set the msg variable to your new last team message, and enables events 8 and 9.
Lines 8-9: These send the client the chat message, and after a 99ms delay, it turns itself off (every client's loop will be at different intervals. If the delay was instant, then only one client would see it. I think there is a chance that a client wont see a message (1/100), but i may be wrong)

Also, this is untested. I might have forgotten some part of it.

Oh forget, completely forgot <var:cl:lastteammsg> existed.