Need some help with GUIs
I need some help with GS2 again :p
After I scripted a little shop, I wanted to script a shop with a GUI. I made a GUI but somehow the text in GuiMLTextCtrl won't change when I select something in GuiTextListCtrl. Here is my script PHP Code:
|
You shouldn't specify numbers as parameters like that, in fact that's why it doesn't work.
Script compiler output for Scratch (in level jerretnpc.nw at pos (30, 30)): error: unexpected symbol 0 at line 9: function Shop_TextList1.onSelect(0,Bombe,1) { Try replacing the onSelect function with this: PHP Code:
|
Okay, thanks. But when I click on "Bombe", I want that in the descriptionfield the description for the bomb appears. How can I do that?
|
Quote:
PHP Code:
|
Okay, thank you. Now I want when I press the button that I can purchase something. When I press the button, the weapon won't get added into my inventory and my money will decrased by 15 and then increase by 15 again.
PHP Code:
|
You can only add weapons and decrease rupees on the server-side, you have the right idea but let's just modify it a little.
PHP Code:
|
Okay, now I understand that script. But somehow it won't run again :eek:
|
If you're using it in a level npc, you'll have to make a few modifications. Assuming that's the problem, you'll need to give a few more details to clear that up.
The npc needs a blocking shape on the server-side, and you have to use triggeraction instead unless you know the npc name which is a little more complicated. PHP Code:
|
Quote:
PHP Code:
PHP Code:
Quote:
|
Quote:
|
Quote:
I see.. But it still won't work xD @cbk1994 I gonna try that after I got the level NPC working. |
All times are GMT +2. The time now is 09:07 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.