Page 2 of 5

Re: The Mother of All Posts...

Posted: March 25th, 2010, 4:26 pm
by arcones
Here ya go Malk!

Code: Select all

"level_trigger_23" = [ moneybag = ( + $moneybag 5 )
   echo "You got a moneybag."
   ]


That should work! And if you want it to show up in your inventory add money bag to:

Code: Select all

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


So that it look's like this:

Code: Select all

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


Code: Select all

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 )
    guitext ( format "You have %1 moneybag(s). Congrats! $money bag )
    ]

    newgui main [
       guilist [
          guilist [
             guibutton "Inventory" "showgui Inventory"
          ]
       ]
       guibar
       @main
    ]


I added moneybag to the inventory and to the "on start" so that in game it'll show up. (In fact, I didn't understand why it worked that way until I looked at your problem! :D)
As for continually updating the inventory, you can either code all the things you can pick up just like I did above or you can try to do a code which automatically updates the inventory (I don't know how to do that though...)

Anyway, hope that helps!

Arc :geek:

Re: The Mother of All Posts...

Posted: March 25th, 2010, 4:42 pm
by Leo_V117
So THATS how you get the money to work. why did nobody tell me that before? :lol:

Re: The Mother of All Posts...

Posted: March 25th, 2010, 4:46 pm
by arcones
Well, it's been in the tut section for a long time ;) but yeah, it's really simple once you get the hang of it... I'm guessing to get the guy to ask you if you need anything again, you'd use the sleep factor... Just an idea of course...

Re: The Mother of All Posts...

Posted: March 25th, 2010, 4:48 pm
by Leo_V117
Okay.... im addicted to coding apps. I need Ideas.!!!!

Re: The Mother of All Posts...

Posted: March 26th, 2010, 3:01 pm
by Venima
Leo, code this:

3 doors which hide the top, middle and bottom parts of a wall. Behind the top, the wall has a red texture, behind the middle, orange/yellow and behind the bottom, green.

When approaching console 1, the doors will open/close in the motion of a traffic light (red, orange/yellow, green) to show green.
When approaching console 2, the doors will open/close to show red.
(note you will probably have to get the player to approach the consoles twice each, to get the lights to change like a traffic light)

Note a traffic light changes like so:
When changing to green: (red, then red and orange/yellow, then green)
When changing to red: (green, then orange/yellow, then red)


If you can code this I will be most impressed.


Btw, I had to code this in assembler.

Re: The Mother of All Posts...

Posted: March 26th, 2010, 3:04 pm
by Leo_V117
thats a matter of assigning more than one function per trigger. At the moment thats almost impossible.

Re: The Mother of All Posts...

Posted: March 26th, 2010, 3:55 pm
by Venima
lol....Not only have I just created this traffic light system, I've also made it two way, and with a moving platform to demonstrate it.

now tell me what site I should use to allow you to download it.

Re: The Mother of All Posts...

Posted: March 26th, 2010, 3:58 pm
by Leo_V117
uh.... Sendfile.com?

Re: The Mother of All Posts...

Posted: March 26th, 2010, 4:06 pm
by Venima
ok, that's mostly full of useless sites (for my case).

I'm trying one out...

kk...try following this link

https://free-venima.medialightbox.com/

Re: The Mother of All Posts...

Posted: March 26th, 2010, 4:40 pm
by Leo_V117
Nope, I prefer sendfile.