PDA

View Full Version : Message system


Steven
06-13-2006, 02:11 PM
ysteI've been working on a little project to try and improve my AS skills, but I hit a wall. I would like a messaging system in my game, like the one in SRPG *C*, can someone help me out with this?

Thanks in advance,
~Steven~

MOOGLEFIGHTER
06-13-2006, 02:13 PM
Please explain this "messaging system" more clearly.

Steven
06-13-2006, 02:32 PM
Where you recive messages, like in SRPG *C* one. Where if you do something in the game you go to a menu and it says you have a message and then you click the button and you can read your messages.

MaxManning
06-13-2006, 08:32 PM
One way is to use a database with php or asp to send/recieve messges.

You create a table called "messages", and create some fields :

Message_ID
From_ID
To_ID
Subject
Body
Sent (Timestamp)
Status -- (unread, read etc)

All this assumes that you have a users table that is related to this table via the From/To indexes. You can also add any other fields you want.

You would call PHP/ASP scripts to interact with the database - send/retrieve/delete messages.

The Brown Cow
06-13-2006, 08:42 PM
I think that's a bit more than he's looking for. :)

Not a user-to-user messaging system, but an in-game messages system, right?

MaxManning
06-13-2006, 08:46 PM
Ah, I wasn't sure what he was looking for exactly. Ingame would be easier, just send directly.

When he said "messages", I was thinking of an inbox type situation.

Steven
06-14-2006, 12:39 PM
Yeah I'm looking for an in-game one.

Jaroldo
06-14-2006, 02:38 PM
One way is to use a database with php or asp to send/recieve messges.

You create a table called "messages", and create some fields :

Message_ID
From_ID
To_ID
Subject
Body
Sent (Timestamp)
Status -- (unread, read etc)

All this assumes that you have a users table that is related to this table via the From/To indexes. You can also add any other fields you want.

You would call PHP/ASP scripts to interact with the database - send/retrieve/delete messages.

this is probaly the easiest way

Steven
06-14-2006, 02:40 PM
Yeah but that's for user to user messages and I want an in-game messaging system.

MaxManning
06-14-2006, 02:46 PM
Do you have an existing game that you want ingame messaging added to ?

Jaroldo
06-14-2006, 02:50 PM
o ok sorry bout dat steven ill ask my friend hell probaly know more

denacioust
06-14-2006, 03:31 PM
Wouldnt this just involve a movie clip? Sorry if I'm being really thick here but thats what it sounds like to me...

MaxManning
06-14-2006, 03:36 PM
I don't think he's worried about displaying the message, I think he needs help with sending the message to another player in a multiplayer game.

denacioust
06-14-2006, 04:09 PM
No hes trying to do like what was done in SRPG c and theres no multiplayer in that...

arkhan
06-14-2006, 06:19 PM
how is it in SRPG c?

The Brown Cow
06-14-2006, 07:03 PM
I think he wants to make a system like the answering machine in SRPG.

Eh, just have a dynamic text field and display strings in it.

arkhan
06-14-2006, 07:17 PM
ooh..ok..thats simple..
make a 2d array with string and 2 booleans per row
msg=[["hey, its mommy..are you wearing clean underwear?",false,false],
["you f**** bas***** I cant belive you did that to my car!! you pay for it!",false,false], etc etc etc...

so, when an evnt occours and you are suposed to get one of those msgs, you set one of the falses to true, an it apears in your answer machine..
after you go there and read it, you set the other one to true, meaning it was read..
and in case it wasnt read yet the machine thing blinks..

The Brown Cow
06-14-2006, 09:07 PM
That's a 2D array.

You could alternatively use a single integer instead of two booleans. Have three states: off, unread, and read.