dotask vs dobuildingtask taskitem discrepency

Forum Archive - from http://theuniversal.net
Locked
User avatar
morbydvisns
Posts: 1889
Joined: Sun Jan 30, 2005 12:51 am

dotask vs dobuildingtask taskitem discrepency

Post by morbydvisns »

Software:Universal Client
Version Number:
________________________________________________________________________
Location
planet
________________________________________________________________________
Description:
dobuildingtask's taskitem input defaults to taskitem2, dotask defaults the taskitem input to taskitem1
________________________________________________________________________
Steps to Replicate:
This may be intended, i donno, but it didn't feel like it should.
User avatar
morbydvisns
Posts: 1889
Joined: Sun Jan 30, 2005 12:51 am

Post by morbydvisns »

after some playing around with using both, i can see how this may be intentional....
User avatar
Mit
Staff
Staff
Posts: 3551
Joined: Sun Sep 21, 2003 10:14 pm
Location: Unknown

Post by Mit »

Indeed i think there's a consistency in the inconsistency (and i don't really wanna break old scripts by moving those around).

Kinda related though, as the task system moved on I found that the 'TaskStart' / 'TaskComplete' event wasn't really what i wanted in most circumstances (especially as i tend to use *dobuildingtask a lot), so i've added some new events :

BuildingTaskStart
CustomTaskStart
CombiTaskStart
BuildingTaskComplete
CustomTaskComplete
CombiTaskComplete

Full docs for those will be at :
http://theuniversal.net/worldmanual/dok ... tem_events

eventually, but meantime..
BuildingTaskStart / Complete : The Event Param is the building type number.
$gTaskItem1 is the task code
$gTaskItem2 is the building instance/record num

CustomTaskStart / Complete : The Event Param is the task code.
$gTaskItem1 is (also) the task code

CombiTaskStart / Complete : The Event Param is the lowest item number involved
$gTaskItem1 is (also) the lowest item number involved
$gTaskItem2 is the second lowest item number involved
$gTaskItem3 is the third lowest item number involved (or 0 if its a 2 combination task)

This made things a whole lot easier for Magicthumb, and I found it particularly useful for building tasks where you can now have all the relevant task code in the same script file as the rest of the building stuff.
Locked