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.

The Land of Terak

Have any cool screenshots and/or projects to show off? Post your content here!
(If you need somewhere to post your images, why not use our gallery?)
User avatar
GR1M
Support Team
Support Team
Posts: 1305
Joined: August 22nd, 2009, 4:35 pm
Name: Luke
IRC Username: Gr1m
Location: Texas
Contact:

Re: The Land of Terak

Post by GR1M »

Ok, but how would you make it to where you give the "npc merchant" a item and then it appears to other people?
Image
Want a user bar like this one? PM Leo
arcones
Support Team
Support Team
Posts: 2734
Joined: January 13th, 2010, 12:42 pm
Name: Timothy
IRC Username: I use Steam
Location: Looking over your shoulder...
Contact:

Re: The Land of Terak

Post by arcones »

Idk...

But, since it might help me w/ Terak, please... keep talking!! :P
Image
Want a user bar like this one? PM Leo!
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: The Land of Terak

Post by Leo_V117 »

arcones said:

I'm not a super coding genius (like someone I know :roll: )
- Meaning Who?

I set my merchant up as a trader. Accidentally anyway.

This may be useful:

Code: Select all

    "on_start" = [
       money = 0
       pie = 0
       sword = 0
       treasure = 0
       ]

    "level_trigger_1" = [ money = ( + $money 5 )
       echo "You got 5 moneys."
       ]

    "level_trigger_2" = "showgui Shopkeeper"

    newgui Shopkeeper [
       guitext "What're ya buyin, stranger?" chat
       guibar
       guilist [
          guibutton "Pie: 10 moneys" [
             if ( > $money 9 ) [
                money = ( - $money 10 )
                pie = ( + $pie 1 )
             ]
          ]
          guibar
          guibutton "Sword: 20 moneys" [
             if ( > $money 19 ) [
                money = ( - $money 20 )
                sword = ( + $sword 1 )
                ]
             ]
          guibar
          guibutton "Treasure: 40 moneys" [
             if ( > $money 39 ) [
                money = ( - $money 40 )
                treasure = ( + $treasure 1 )
                ]
             ]
       ]
    ]

    newgui Inventory [
    guibutton "Back" "cleargui 1"
    guibar
    guitext ( format "You have %1 moneys in your wallet." $money )
    guitext ( format "You have %1 pies.  Yum." $pie )
    guitext ( format "You have %1 swords.  Not that you can use them..." $sword )
    guitext ( format "You have %1 treasures.  Lucky you!" $treasure )
    ]

    newgui main [
       guilist [
          guilist [
             guibutton "Inventory" "showgui Inventory"
          ]
       ]
       guibar
       @main
    ]
Hope this helps.
User avatar
GR1M
Support Team
Support Team
Posts: 1305
Joined: August 22nd, 2009, 4:35 pm
Name: Luke
IRC Username: Gr1m
Location: Texas
Contact:

Re: The Land of Terak

Post by GR1M »

I've seen that script before a long time ago.
Image
Want a user bar like this one? PM Leo
arcones
Support Team
Support Team
Posts: 2734
Joined: January 13th, 2010, 12:42 pm
Name: Timothy
IRC Username: I use Steam
Location: Looking over your shoulder...
Contact:

Re: The Land of Terak

Post by arcones »

Simple stuff Leo. (I was talking about Venima) ;)

I believe the original question was
GR1M wrote:Ok, but how would you make it to where you give the "npc merchant" a item and then it appears to other people?
We're trying to make something go between three people. From the 1st player :arrow: the NPC :arrow: 2nd player and whatnot. The shop script just allows the NPC to give stuff to you, not you to it and then it to someone else.

Just clearing things up! ;)
Image
Want a user bar like this one? PM Leo!
User avatar
GR1M
Support Team
Support Team
Posts: 1305
Joined: August 22nd, 2009, 4:35 pm
Name: Luke
IRC Username: Gr1m
Location: Texas
Contact:

Re: The Land of Terak

Post by GR1M »

Yeah......
Image
Want a user bar like this one? PM Leo
User avatar
Venima
Support Team
Support Team
Posts: 259
Joined: February 17th, 2010, 4:56 am
Name: Tombstone
IRC Username: Venima
Location: Somewhere in the eternal planes between the living and the dead

Re: The Land of Terak

Post by Venima »

Rough example:

Code: Select all

player1_apples = 0
player2_apples = 0
shop1_apples = 0

level_trigger_1 = [ //the shop
	
	showgui shop1a
]
newgui shop1a [
	guitext "Hello!" chat
	guibar
	guibutton "[buy an apple]" "showgui shop1c"
	guibutton "[sell an apple]" "showgui shop1b"
	guibutton "[exit]" "cleargui"
]
newgui shop1b [
	//If statement needed here to query which player has triggered this
	[player1_apples = (- $player1_apples 1)] [player2_apples = (- $player1_apples 1)]
	shop1_apples = (+ $shop1_apples 1)
	guitext "you have sold an apple."
	guibar
	guibutton "Ok." "cleargui 1" //I think
]
newgui shop1b [
	//If statement needed here to query which player has triggered this
	[player1_apples = (+ $player1_apples 1)] [player2_apples = (+ $player1_apples 1)]
	shop1_apples = (- $shop1_apples 1)
	guitext "you have sold an apple."
	guibar
	guibutton "Ok." "cleargui 1" //I think
]
Only thing is, how do we check which player is triggering the event?
Tombstone's Tournament round 2 has begun! Tombstone's Posting Tournament

Try out my: CFG Easy Text Editor (Note: still in beta)

-----Venima
Image
Image
User avatar
GR1M
Support Team
Support Team
Posts: 1305
Joined: August 22nd, 2009, 4:35 pm
Name: Luke
IRC Username: Gr1m
Location: Texas
Contact:

Re: The Land of Terak

Post by GR1M »

I really don't know, are you still trying to figure it out?
Image
Want a user bar like this one? PM Leo
User avatar
Venima
Support Team
Support Team
Posts: 259
Joined: February 17th, 2010, 4:56 am
Name: Tombstone
IRC Username: Venima
Location: Somewhere in the eternal planes between the living and the dead

Re: The Land of Terak

Post by Venima »

I never started...
Tombstone's Tournament round 2 has begun! Tombstone's Posting Tournament

Try out my: CFG Easy Text Editor (Note: still in beta)

-----Venima
Image
Image
User avatar
GR1M
Support Team
Support Team
Posts: 1305
Joined: August 22nd, 2009, 4:35 pm
Name: Luke
IRC Username: Gr1m
Location: Texas
Contact:

Re: The Land of Terak

Post by GR1M »

I would be very happy and I'm sure others will to if this thing gets spoken in existence.
Image
Want a user bar like this one? PM Leo
Locked