HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

substring event

07-28-2004, 07:28 PM#1
AFZ
In my rpg, I´m trying to create a talk-system, whre the player will communicate with units by moving the rpg-character unit next to other units and entering chat strings to talk.

I think of doing this by evaluating sub-strings on the entered chat string. but i won't know exactly where the substring will be, beacuse the player could type any words in between the important words that i will evaluate. So, Is there a way to use an "and" operator on events, like:

-- event1 and event2 hapend then do action --

(that way i could evaluate several usbstrings in an entered chat string)
07-28-2004, 07:34 PM#2
johnfn
It would actually be a condition, not an action. Second of all making a custom chatting system is sadly impossible because there is no way to clear the chat screen. I thought I might mention that so that you might save time. That is, unless you find a way to bypass it.
07-28-2004, 07:54 PM#3
AFZ
Yeah, I tried using conditions, but there's only a Substring x,y condition, and I won´t know the x and y values, because the player could just type "hello" or "whats up!" and that changes the substring numbering...

As for the chat screen clearing: i will use transmissions to the unit answers.

And the player will have to talk slowly... ;)
07-28-2004, 07:59 PM#4
AFZ
I came up with a different idea to communicate: the player moves his unit near the unit he wants to talk to and selects that unit too:

then the player enters a chat string

then each sub-string of the chat string is evaluated, and if the sub-string is recognized, then it launches another trigger that checks other sub-strings that could be related to the previously-entered chat string, and it repeats on and on until there's no more sub-strings to evaluate.

It will need a lot of triggers !
07-28-2004, 08:02 PM#5
AFZ
and there will be radom answers...