+MiniCachingCrew Posted February 6, 2008 Share Posted February 6, 2008 Hi; I'm having trouble getting task events to fire - other than manually inserting lua code to call the event handler function. To test the problem, I created a simple cartridge with one zone hidden and inactive and one active/visible containing an item. The idea is to go into the visible zone, take an item, then activiate/make visible the second zone upon taking the item. In the "OnTakeItem" event handler for the item, I set "CorrectState" to "correct" for the task, but nothing happens when the item is taken. As a test, I manually inserted a call to the tasks "OnCorrectChanged" event handler and the zone popped up just like it should when the item was taken. I've also tried getting the other task event handlers to fire without success. In addition to activating a zone, I've tried other actions like displaying a message and changing a variable. It seems like the event handlers aren't getting called. I was also wondering if there was a list of known bugs somewhere that I missed. I'm using version 2.0.4721.3802 of the builder. Thanks Here's a snippet of code from the lua code that the builder generates along with the statement I inserted to get it to work (commented out.) function zitemItemOne:OnTakeItem() -- #GroupDescription=Script -- -- #Comment=Script Comment -- zitemItemOne:MoveTo(Player) ztaskTaskOne.CorrectState = "correct" -- test when the following statement is inserted, the everything works -- -- ztaskTaskOne:OnCorrectChanged() -- end function ztaskTaskOne:OnCorrectChanged() -- #GroupDescription=taskcorrect -- -- #Comment=taskcorrect Comment -- zoneZoneTwo.Active = true zoneZoneTwo.Visible = true end Quote Link to comment
+smthng Posted February 15, 2008 Share Posted February 15, 2008 I'm having trouble getting task events to fire - other than manually inserting lua code to call the event handler function. To test the problem, I created a simple cartridge with one zone hidden and inactive and one active/visible containing an item. The idea is to go into the visible zone, take an item, then activiate/make visible the second zone upon taking the item. I'm getting similar behavior on my task events. It looks like they aren't triggering at all. Here's what I did... Made a quick and easy cartridge with three zones (all active). Made three tasks that were basically "Go to each zone". When the zones are entered, they fire off a "When the player enters a zone" event that sets the appropriate task to Complete... "Set ztaskGoToJeffersonMemorial Complete true". The tasks do get flagged as complete, as I can see them disappear in the emulator. Each task has a "When a task status changes" event that is supposed to do the following: Increment TaskCount by 1 If TaskCount Equal 3 Show a series of Dialog messages to the player Set cartDCMallTour complete true else Show a message to the player end None of that seems to be happening at all. I don't get the series of dialogs when all tasks are completed (TaskCount=3) and I don't get the (else) message if they aren't all completed. The cartridge never gets completed either. Is this a bug with the builder or code, or a bug with the emulator? My Builder is 2.0.4807.4874 2/11/2008 10:06:48 AM and my emulator is 1.0.2963.18199 12/31/1600 7:00PM engine version 2.11. If you want more detail (including message log), it's all posted in the tutorial I'm building at http://smthng.info/Builder (near the bottom). Quote Link to comment
+davidloew Posted February 15, 2008 Share Posted February 15, 2008 (edited) I'm having trouble getting task events to fire - other than manually inserting lua code to call the event handler function. To test the problem, I created a simple cartridge with one zone hidden and inactive and one active/visible containing an item. The idea is to go into the visible zone, take an item, then activiate/make visible the second zone upon taking the item. I'm getting similar behavior on my task events. It looks like they aren't triggering at all. Here's what I did... Made a quick and easy cartridge with three zones (all active). Made three tasks that were basically "Go to each zone". When the zones are entered, they fire off a "When the player enters a zone" event that sets the appropriate task to Complete... "Set ztaskGoToJeffersonMemorial Complete true". The tasks do get flagged as complete, as I can see them disappear in the emulator. Each task has a "When a task status changes" event that is supposed to do the following: Increment TaskCount by 1 If TaskCount Equal 3 Show a series of Dialog messages to the player Set cartDCMallTour complete true else Show a message to the player end None of that seems to be happening at all. I don't get the series of dialogs when all tasks are completed (TaskCount=3) and I don't get the (else) message if they aren't all completed. The cartridge never gets completed either. Is this a bug with the builder or code, or a bug with the emulator? My Builder is 2.0.4807.4874 2/11/2008 10:06:48 AM and my emulator is 1.0.2963.18199 12/31/1600 7:00PM engine version 2.11. If you want more detail (including message log), it's all posted in the tutorial I'm building at http://smthng.info/Builder (near the bottom). I can confirm that the builder is not writing out the proper functions for the task events. I'm making the change now and will have an update today. Thanks for testing this. So much for having it today. This change has to be made to our "engine" code and so will take some time to get done. I'll probably have something by the end of next week. David. Edited February 16, 2008 by davidloew Quote Link to comment
+smthng Posted February 15, 2008 Share Posted February 15, 2008 I can confirm that the builder is not writing out the proper functions for the task events. I'm making the change now and will have an update today. Thanks for testing this. I probably tried a half dozen different ways to fire that puppy and couldn't get anywhere. Glad to know it's not just me being stupid. Thanks! Quote Link to comment
+Morgue Posted February 17, 2008 Share Posted February 17, 2008 I'm glad I checked here! I was about to go crazy trying to make a task event work. It seemed right, but just did not work. Will be watching for the next release! THANK YOU! Quote Link to comment
Tydirium Posted February 24, 2008 Share Posted February 24, 2008 Glad to see it isn't me screwing things up. I was trying all sorts of things and after about 30 minutes or so, I decided to come check out the boards. Now no more time will be wasted. Guess I'll just have to work around the issue or wait for a fix. Quote Link to comment
kvhollis Posted March 3, 2008 Share Posted March 3, 2008 I'm having trouble getting task events to fire - other than manually inserting lua code to call the event handler function. To test the problem, I created a simple cartridge with one zone hidden and inactive and one active/visible containing an item. The idea is to go into the visible zone, take an item, then activiate/make visible the second zone upon taking the item. I'm getting similar behavior on my task events. It looks like they aren't triggering at all. Here's what I did... Made a quick and easy cartridge with three zones (all active). Made three tasks that were basically "Go to each zone". When the zones are entered, they fire off a "When the player enters a zone" event that sets the appropriate task to Complete... "Set ztaskGoToJeffersonMemorial Complete true". The tasks do get flagged as complete, as I can see them disappear in the emulator. Each task has a "When a task status changes" event that is supposed to do the following: Increment TaskCount by 1 If TaskCount Equal 3 Show a series of Dialog messages to the player Set cartDCMallTour complete true else Show a message to the player end None of that seems to be happening at all. I don't get the series of dialogs when all tasks are completed (TaskCount=3) and I don't get the (else) message if they aren't all completed. The cartridge never gets completed either. Is this a bug with the builder or code, or a bug with the emulator? My Builder is 2.0.4807.4874 2/11/2008 10:06:48 AM and my emulator is 1.0.2963.18199 12/31/1600 7:00PM engine version 2.11. If you want more detail (including message log), it's all posted in the tutorial I'm building at http://smthng.info/Builder (near the bottom). I can confirm that the builder is not writing out the proper functions for the task events. I'm making the change now and will have an update today. Thanks for testing this. So much for having it today. This change has to be made to our "engine" code and so will take some time to get done. I'll probably have something by the end of next week. David. I am in exactly the same boat. Does anyone know the status of this? Has it been fixed? I downloaded the lastest build Saturday, March 1st. Quote Link to comment
+davidloew Posted March 3, 2008 Share Posted March 3, 2008 I am in exactly the same boat. Does anyone know the status of this? Has it been fixed? I downloaded the lastest build Saturday, March 1st. sorry, no this has not been fixed yet. it is something in the engine code and that takes a little more time to work on. I don't have a timeline yet. David. Quote Link to comment
+twolpert Posted March 4, 2008 Share Posted March 4, 2008 I can shed a little additional light on this if it will help find the problem. I am using the builder dated 02/28/2008 2.0.4828.4384 with the emulator/engine that came with it. At least some task events do fire, at least in some circumstances, at least in the emulator. In particular, the following chain of events does work: On zone entry fires when the player enters a zone. Script attached to the zone entry event displays an input. Input complete event fires when the user provides an input. Script attached to the input complete event sets a task to "correct" (different from the initial value) That triggers a correct value change event. The script attached to the correct value event successfully displays a message box. The task was active, visible and NOT complete when the script changed the CorrectState property value. The only other thing that might be relevant is that I do have script attached to all three task events for this task. I only tested the correct value changed event because I ran into the following oddity as well. I found that the actual CorrectState property value is not changed. I tested this by printing the property value in the debugger before and after the correct value event fired. In the debugger, I also verified that I am unable to directly set the values for the Active and Complete properties when I have script attached to the corresponding event. The lua statement does not fail, but printing the property value before and after the assignment shows no change. This problem does not occur for tasks for which I have no attached script. I first wrote this behavior off to attempting to set properties with change events attached from the debugger. Would not surprise me if that did not work. But then I tried it from script attached to another event (as above) and got the same result. Hope this helps. Tom Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.