• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Chat Log - Array?

Status
Not open for further replies.
Level 9
Joined
Oct 20, 2010
Messages
228
Hello everyone again. Today I am attempting to create a logging system that lets you call upon call messages recently sent.

First, for some background, I have a custom chat system that prevents messages from showing up both in the bottom left and in the typical log.

I am trying to make a command that when typed will show the last 15 sent messages. I also hope to be able to add a number after the command to see previous pages (like chatlog, chatlog 1, etc). I've started my attempt at coding it by saving sent messages into an array but it's all quickly to much for me to handle and I don't know where to start with this. Any help is appreciated, thank you!

If this is confusing, please ask follow up questions. I may not be the best at explaining :)
 
Level 45
Joined
Feb 27, 2007
Messages
5,578
  • -------- in chat string "" event --------
  • Set ChatCount = ChatCount + 1
  • Set ChatString[ChatCount] = (Entered chat string)
  • -------- to print last 15 messages --------
  • For each (Integer A) from 0 to 14 do (Actions)
    • Loop - Actions
      • Game - Display to (All Players) the message ChatCount[(ChatCount - (Integer A))]
 
Status
Not open for further replies.
Top