[Code Request] A Looping Message

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

initialD
Some Honorary Title
Posts: 1713
Joined: June 8th, 2007, 5:08 am
Title: Angry Bird

Re: [Code Request] A Looping Message

Post by initialD »

Code: Select all

//under globals
trigger tfai=CreateTrigger()
real FaiTime=60

//under endglobals
function displayFaiText takes nothing returns nothing
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20,"You Are Gay!")
endfunction

//under function main, after locals
call TriggerAddAction(tfai,function displayFaiText)
call TriggerRegisterTimerEvent(tfai,FaiTime,true)
Just edit it yourself if you want to.
FaiTime is 60. Which means the text will appear every 60 seconds. Edit it to your timer if you want to.
"you are gay" is the text message.
number 20 before the text message is the duration for the text on the screen(how long the text will last)

good luck have fun.
Black-Hole
Forum Fanatic
Posts: 315
Joined: October 16th, 2007, 7:32 pm

Re: [Code Request] A Looping Message

Post by Black-Hole »

I think hes looking for something more like this... i made this in 1 min so you could prob make it better.

Code: Select all

Chat
    Events
        Player - Player 1 (Red) types a chat message containing <Empty String> as A substring
    Conditions
    Actions
        Set String_Array[(Player number of (Triggering player))] = (Entered chat string)

Code: Select all

Chat Display
    Events
        Time - Every 60.00 seconds of game time
    Conditions
    Actions
        For each (Integer A) from 1 to (Number of players in (All players controlled by a User player)), do (Actions)
            Loop - Actions
                Game - Display to (All players) the text: String_Array[(Integer A)]
OR... if you dont want the player to set the message ingame, than this would be your trigger. (I didnt make this in World Editor just typed it, might be wrong in some parts)

Event: Time - Periodic Event Every 60 seconds
Condition:
Action: Game - Display message to (All players) the text (You are a retard!)

That would also work... If you want the first one i can make it so Player 1 red can put Multiple messages in that will display.
initialD
Some Honorary Title
Posts: 1713
Joined: June 8th, 2007, 5:08 am
Title: Angry Bird

Re: [Code Request] A Looping Message

Post by initialD »

Black-Hole wrote:I think hes looking for something more like this... i made this in 1 min so you could prob make it better.
w/e I don't think he cares? He didn't even reply?