Jump to content

Gormare

+Premium Members
  • Posts

    8
  • Joined

  • Last visited

Everything posted by Gormare

  1. Hi! I have a function like this below that takes a players input. Depending on input the variabel animal gets a new value and a new function are called. It works nice! But! here is a lot of animals around so insteed of doing theese if's I was thinking is it possible to do the same with a table/ arrays? function check_animal(input) local animal = input local key = string.sub(animal, 1, 3) if key == "dog" then animal = " You like the dog." dog() else if key == "cat" then animal = "You like the cat." cat() end end end
  2. Ty Charlenni :)works lika a charm :)I take the chance and ask one more question! Is there a way to do something similar and transferer items and images to the same zone? for ex I like the dragon to be seen in the zone and the player would have to option to pick it up!!
  3. Hi! Thanks for the update of urwigo Im trying to dig deep into lua (Building my cartridge with Urwigo) For the moment ive building an cartridge for to be played anywhere. Ive got 8 zones and the cartridge work well. But i would like to build something like a memory game. So in these 8 zones I need to get 4x2 pictures (one picture in each zone). And then you have to pair the pictures..You get it? I know how to get them there by adding a picture for each zone in the inventory or in the zoneImage. But is there a way to add the pictures randomly? When starting the cartridge! Update: Im answering my own question Yes you can get a random picture function RandomPicture() local images={apple1,apple2,bananas3,bananas4} local r=math.random(table.getn(images)) Wherigo.MessageBox{Text="The fruit", Media=images[r]} end But how to get them into random zone ?
  4. That looks nice Looking forward for to get my hands on that one.
  5. That sounds great We hope that it will work soon again..
  6. Hi! Im asking in this forum since there seems to be a lot of knowledge here. Today when i started Urwigo it doesnt display any map. It seems to be a problem to connect with the mapserver?? Can someone confirm this?
×
×
  • Create New...