by FDARI » Tue Oct 04, 2011 7:07 am
I don't think I would go for a separate parameter to make an actor define its own tid. It is not really within the realm of decorate to assign a specific tid, although it gains the ability through the ability to access specials. Decorate is for the generic definition of an actor, and the tid is more of a specific detail, more suited to ACS. (So, one reason is style, or the feel and focus of the language.)
Also, it would end up after the "random chance of not spawning an actor"-parameter, which is really far to the right. If a more appropriate and obviously useful feature is proposed at a later point again, it will have to go to the right of that again. If anything is to be added, I don't think it is tid-assignment.
If you want your actor to set an explicit tid anyway, you can work around it. Using the submitted feature, you could do:
Code: Select all
actor Something
{
var int user_tid;
states
{
spawnWithTID:
TNT1 A 0 A_SetUserVar("user_tid", tid)
TNT1 A 0 Thing_ChangeTID(0, 2000)
TNT1 A 0 A_SpawnItemEX("SomethingElse", 0,0,0, 0,0,0, 0, SXF_TRANSFERTID)
TNT1 A 0 Thing_ChangeTID(0, user_tid)
goto See
}
}
I don't think I would go for a separate parameter to make an actor define its own tid. It is not really within the realm of decorate to assign a specific tid, although it gains the ability through the ability to access specials. Decorate is for the generic definition of an actor, and the tid is more of a specific detail, more suited to ACS. (So, one reason is style, or the feel and focus of the language.)
Also, it would end up after the "random chance of not spawning an actor"-parameter, which is really far to the right. If a more appropriate and obviously useful feature is proposed at a later point again, it will have to go to the right of that again. If anything is to be added, I don't think it is tid-assignment.
If you want your actor to set an explicit tid anyway, you can work around it. Using the submitted feature, you could do:[code]actor Something
{
var int user_tid;
states
{
spawnWithTID:
TNT1 A 0 A_SetUserVar("user_tid", tid)
TNT1 A 0 Thing_ChangeTID(0, 2000)
TNT1 A 0 A_SpawnItemEX("SomethingElse", 0,0,0, 0,0,0, 0, SXF_TRANSFERTID)
TNT1 A 0 Thing_ChangeTID(0, user_tid)
goto See
}
}[/code]