Hi! Welcome to the forum for Platinum Arts Sandbox Free 3D Game Maker. I currently have the forums locked as I am attempting to properly update them.

In the meantime please join the new Discord Server!

If you have any questions please e-mail me through the Platinum Arts website.

Creating messages

Having issues not related to a specific Sandbox game mode? Get help here!
Please also read the rules for support when posting support requests.
Failure to comply with the forum rules may result in your topic being locked without resolution.
Locked
dino-in-a-box
Member
Member
Posts: 8
Joined: August 6th, 2010, 4:03 pm

Creating messages

Post 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!
User avatar
PizzaLover101
Member
Member
Posts: 1751
Joined: October 23rd, 2009, 1:33 pm
Name: NAME
IRC Username: DaItsicle
Location: By a computer
Contact:

Re: Creating messages

Post by PizzaLover101 »

Ahh, like a gui?

I'll see if i can find one, but search "making a gui" (without "'s)
Project 1: Da Chest Collector [TBD]
Project 2: Tis a secret [End of summer] announcement June 22 2011
Project 3: An even bigger secret!

http://pizzagametime.tk/
http://forums.pizzagametime.tk/
chocolatepie33
Support Team
Support Team
Posts: 2458
Joined: April 27th, 2010, 5:31 pm
IRC Username: CP

Re: Creating messages

Post 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")
Julius wrote:Contribute to http://www.opengameart.org NOW!
Save the wiki!
User avatar
Leo_V117
Support Team
Support Team
Posts: 1640
Joined: February 16th, 2010, 8:00 pm
Name: Leo
IRC Username: Leo_V117
Location: That one place...
Contact:

Re: Creating messages

Post 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
dino-in-a-box
Member
Member
Posts: 8
Joined: August 6th, 2010, 4:03 pm

Re: Creating messages

Post 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!
User avatar
Leo_V117
Support Team
Support Team
Posts: 1640
Joined: February 16th, 2010, 8:00 pm
Name: Leo
IRC Username: Leo_V117
Location: That one place...
Contact:

Re: Creating messages

Post 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
Locked