Jump to content

aarastas

Members
  • Posts

    9
  • Joined

  • Last visited

Everything posted by aarastas

  1. I've seen this error on occasion. I've tried restarting the builder, logging off and logging on. All with no affect. Then all of a sudden it will work fine again. Seems like a pretty intermittent problem.
  2. aarastas

    ShowScreen

    Is there a way to go directly to an items Actions screen to avoid the extra click? Is there a print statement I could use in the emulator to show the name of the current screen? would like to replace : Wherigo.ShowScreen(Wherigo.DETAILSCREEN,zitemCandle) with something like Wherigo.ShowScreen(Wherigo."ACTIONS"SCREEN,zitemCandle) In the following block: function zitemCandle:OnClick() if Player:Contains(zitemCandle) thenWherigo.ShowScreen(Wherigo.DETAILSCREEN,zitemCandle) endend Is there a way to do this? In the Cart I'm building it's important to navigate to certain commands quickly when danger is approaching. Thanks
  3. Is there a list of things that don't work (or things that work differently) on Garmin devices? The following code works as I'd like on the simulator but no message box is displayed on the Garmin Oregon nor is the callback function executed. I can't seem to find what the Oregon dosn't like about the code. function zitemCandle:OnClick() -- #GroupDescription=Script -- -- #Comment=Script Comment -- local d2,b2 = Wherigo.VectorToPoint(Player.ObjectLocation, zitemCandle.ObjectLocation) if not Player:Contains(zitemCandle) and (math.floor (d2("ft")) < 3) == true then Wherigo.MessageBox{Text=[[Take it with you?]],Buttons={"Yes","No",},Callback=cartForestatNight.MsgBoxCBFuncs.MsgBoxCB2} end if zitemCandle.Opened == true and Player:Contains(zitemCandle) then Wherigo.MessageBox{Text=[[seconds of wick left: ]] .. CandleBurn ,Buttons={"Put it out","Put it down",},Callback=cartForestatNight.MsgBoxCBFuncs.MsgBoxCB1} end if zitemCandle.Opened == false and Player:Contains(zitemCandle) then Wherigo.MessageBox{Text=[[seconds of wick left: ]] .. CandleBurn ,Buttons={"Light it","Put it down",},Callback=cartForestatNight.MsgBoxCBFuncs.MsgBoxCB4} end end I've attached the source code for the cartridge I'm working on if you'd like to look at it in the simulator. Also the builder gives the following parse errors but I can't see a problem: Parse Error: zitemCandle:OnClick:not Player:Contains(zitemCandle) and (math.floor (d2("ft")) < 3) == true Parse Error: zitemCandleTick:OnTick: if CandleBurn > 0 then --comment Thanks Forest_at_Night_Work.zip
  4. I'm using OnClick with a Garmin Oregon as well and do not see the MessageBox when running the cartrige from the Oregon. Everything works file on the Simulator. The code I'm using is below: function ztaskStayAlive:OnClick() -- #GroupDescription=Script -- -- #Comment=Script Comment -- Wherigo.MessageBox{Text=[[Life Points remaining: ]] .. LifePoints,} end or function ztaskSavethePrincess:OnClick() -- #GroupDescription=Script -- -- #Comment=Script Comment -- ztaskSavethePrincess.Active = true Wherigo.MessageBox{Text=[[You must save the Princess...to do so rescue her form the castle. This is a treacherous land with many dangers. You have 5 life points available and can check how you are doing in the "Stay Alive" task. Good Luck.]],} end
  5. Ranger Fox...the trick you used to place a variable in the item name zitemCandle.Name = "Candle: " .. CandleBurn .. "s left" does not seem to apply to a character name. zcharacterSpiders.Name = "Spiders " .. Spiders .. " feet away" trying to modify a character name this way gives a compile error. Actually I can't seem to get a name change to apply to a character at all zcharacterSpiders.Name = "Spiders are coming" I'm trying to apply the same trick to be able to view the some numerical status of a character.
  6. Thanks Ranger Fox Naming the item works great for viewing it's status (decremented variable by timer tick) The work around will be fine for the timer not stopping...but perhaps it's a limitation of trying to stop itself with in its own tick event. If anyone knows how to stop a timer based on a variable with in it's own tick event please let us know... Thanks all
  7. Thanks Ranger Fox, I have the timer working now using ticks and a variable...can any one give an example of the "custom" code that would display/refresh the variable while viewing an item. I've attached the .lua file I'm playing around with timers in...if you enter the "candle" zone you will pick up the candle item...if you light it it will last 10 seconds...if you extinguish it you will stop the timer. I'd like to make the burn time left visible to the player...worst case I'd like to inform the player of time left when they light or extinguish the candle from a message box. How do you display a variable as a message or as part of the item name. Thanks Timers_Test.zip
  8. Can anyone help me make a countdown timer visible to a player? I have a item (Candle) That will only burn for a certain amount of time. How can I make the timer visible when viewing the item?[/font] function zitemCandle:OnClick() -- #GroupDescription=Candle Burn -- -- #Comment=Candle Burn Comment -- Wherigo.MessageBox{Text=[[What do you wan't to do with the candle?]],Buttons={"Light","Extinguish",},Callback=cartSpiders.MsgBoxCBFuncs.MsgBoxCB1} end ------End Builder Generated functions, Do not Edit, this will be overwritten------ ------------------------------------------------------------------------------- ------Builder Generated callbacks, Do not Edit, this will be overwritten------ ------------------------------------------------------------------------------- --#LASTCALLBACKKEY=1#-- cartSpiders.MsgBoxCBFuncs.MsgBoxCB1 = function(action) -- #GroupDescription=Light -- -- #Comment=Light Comment -- if action == "Button1" then ztimerCandle:Start() else ztimerCandle:Stop() end end
×
×
  • Create New...