by xtkaythen » Sun Mar 17, 2013 7:59 pm
GetLineUDMFInt don't work. Attached example wad is two sectors, one inside the other. One linedef (not sidedef) of the inner sector has the custom user key (called property in DB2) named "triggertype", an integer, with the value of 15. Said line is tagged 3. This same line, onuse, repeatableaction, will execute script 01.
Scriptlump is simply as follows:
Code: Select all
#include "zcommon.acs"
script 01 (void)
{
log(i:GetLineUDMFInt(3, "triggertype")); //int lineid, string fieldname
}
For all intents and purposes, the player should see 15 in the console and upper left corner, correct? 'Fraid not.
Regardless of tag number, field name, field value, direct usage or preloading in a variable in a script, it returns 0. It also returns 0 if triggertype is not defined. that's totally unexpected behavior for a really big error like that.
You can even open it up in SLADE3 and scroll to line 118 - 131 to look at the linedef def (

) ; triggertype is defined.
tl;dr GetLineUDMFInt seems to always = 0; even when acting on invalid targets.
- Attachments
-
GetLineUDMFIntDontWork.wad
- (2.96 KiB) Downloaded 22 times
GetLineUDMFInt don't work. Attached example wad is two sectors, one inside the other. One linedef (not sidedef) of the inner sector has the custom user key (called property in DB2) named "triggertype", an integer, with the value of 15. Said line is tagged 3. This same line, onuse, repeatableaction, will execute script 01.
Scriptlump is simply as follows: [code]#include "zcommon.acs"
script 01 (void)
{
log(i:GetLineUDMFInt(3, "triggertype")); //int lineid, string fieldname
}[/code]
For all intents and purposes, the player should see 15 in the console and upper left corner, correct? 'Fraid not.
Regardless of tag number, field name, field value, direct usage or preloading in a variable in a script, it returns 0. It also returns 0 if triggertype is not defined. that's totally unexpected behavior for a really big error like that.
You can even open it up in SLADE3 and scroll to line 118 - 131 to look at the linedef def ( :lol: ) ; triggertype is defined.
[size=150]tl;dr GetLineUDMFInt seems to always = 0; even when acting on invalid targets.[/size]