by Kate » Tue Nov 23, 2010 5:05 pm
for reference, you can do it like this:
Make an [wiki=Libraries]ACS Library[/wiki] and make a script that looks like this:
Code: Select all
#library "LUMPNAME"
#include "zcommon.acs"
Script 256 (void)
{
SetResultValue (CheckInventory ("InventoryItem"));
}
Make sure it's loaded using [wiki]LOADACS[/wiki] by listing it on a line in the lump.
Then in your decorate code, use [wiki]ACS_ExecuteWithResult[/wiki] to call the script you made as part of the expression:
Code: Select all
Spawn:
TNT1 AA 0 A_SpawnItemEx ("SomeObject", 0, 0, 32.0, 20.0 + (2.0 * ACS_ExecuteWithResult (256)), 0, 0, 0)
Hopefully it should be simple enough.
for reference, you can do it like this:
Make an [wiki=Libraries]ACS Library[/wiki] and make a script that looks like this:
[code]#library "LUMPNAME"
#include "zcommon.acs"
Script 256 (void)
{
SetResultValue (CheckInventory ("InventoryItem"));
}[/code]
Make sure it's loaded using [wiki]LOADACS[/wiki] by listing it on a line in the lump.
Then in your decorate code, use [wiki]ACS_ExecuteWithResult[/wiki] to call the script you made as part of the expression:
[code]Spawn:
TNT1 AA 0 A_SpawnItemEx ("SomeObject", 0, 0, 32.0, 20.0 + (2.0 * ACS_ExecuteWithResult (256)), 0, 0, 0)[/code]
Hopefully it should be simple enough.