Page 1 of 1
Creating messages
Posted: November 16th, 2010, 5:40 am
by dino-in-a-box
Hi,
I've asked in the wrong section:
dino-in-a-box wrote:I've seen a message in the map named 'village' when you go to the 'baker'!
And now I want to make messages too but I don't know how to do it!
Is there a tutorial or can you help me?
I've got a link...
viewtopic.php?f=24&t=1302
... but I don't know what I would need from there.
One example: 'I want a message to pop up when I go to 'Ogre Red'
(I've put the 'Ogre Red' on my map) that says: 'I want you to pickup
20 'Ground lamps' (I know how to pickup objects) with an 'OK' button!
Thanks!
Re: Creating messages
Posted: November 22nd, 2010, 8:24 pm
by PizzaLover101
Ahh, like a gui?
I'll see if i can find one, but search "making a gui" (without "'s)
Re: Creating messages
Posted: November 22nd, 2010, 10:59 pm
by chocolatepie33
Alright, catering to your specific details...
Code: Select all
on_start = [
ground-lamps = 0
]
level_trigger_1 = [showgui npc1-1]
newgui npc1-1 [
guitext "I want you to find 20 ground lamps."
guibar
guibutton "Okay." [cleargui]
] "Ogre red"
If you don't want "Ogre red" to be the title/name of the character, replace it within the quotation marks ("Name goes here")
Re: Creating messages
Posted: December 9th, 2010, 11:55 am
by Leo_V117
Everyones so simple... I can make it look fairly good. Here:
Code: Select all
on_start = [
ground-lamps = 0
]
level_trigger_1 = [showgui npc1-1]
level_trigger_2 = [*add mathematic string here*]
newgui npc1-1 [
guitext "I want you to find 20 ground lamps."
guibar
if (> $ground-lamps 19) [
guibutton (format "I have %1 ground lamps!" $ground-lamps) [showgui npc1-2]
]
if (< $ground-lamps 19) [
guibutton "Okay." [cleargui]
]
] "Ogre red"
newgui npc1-2 [
guitext "Ah, Good work!"
guitext "Heres a reward... Although, You should choose one!"
guibar
guibutton "reward 1" [echo "you got a *reward name*" ; *insert mathematic string here* ; showgui npc1-2-2]
guibutton "reward 2" [echo "you got a *reward name*" ; *insert mathematic string here* ; showgui npc1-2-2]
guibutton "reward 3" [echo "you got a *reward name*" ; *insert mathematic string here* ; showgui npc1-2-2]
]
newgui npc1-2-2 [
guitext "Is there anything else I can do for you?"
guibar
guibutton "No thanks" [echo "Okay, Goodbye!" ; cleargui]
guibutton "option" [do whatever]
guibutton "option" [do whatever]
]
Hope this helps.
- Leo
Re: Creating messages
Posted: December 9th, 2010, 2:11 pm
by dino-in-a-box
Lots of thanks for your answers!

My problem: I've already made many games with Platinum Arts Sandbox
(I found it all very self-explanatory) but I've never added a script to a game before
and therefore don't know how to do it.
If it's too difficult to explain I would be happy to read a tutorial about it.
Thanks again!
Re: Creating messages
Posted: December 9th, 2010, 4:19 pm
by Leo_V117
The code I sent in the post above yours would go in "*mapnname*.cfg", usually accessed through the CFG edito in the Editing GUI menu. Most of the scripting is easy to do, and maps are stored with the CFG files in my_stuff/packages/base/*mode*/
Any more questions, Let me know.
- Leo