scripting artifacts

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
User avatar
SargeBaldy
Posts: 366
Joined: Tue Jul 15, 2003 3:49 pm
Location: Oregon

scripting artifacts

Post by SargeBaldy »

is there any trick you could use to your script your own artifact effects? or could this perhaps be added if not?
Cyb
Posts: 912
Joined: Tue Jul 15, 2003 5:12 pm

Post by Cyb »

with a pickupable decorate item and a couple scripts, though, it depends on what exactly you want the artifact to do heh
User avatar
Nanami
Posts: 1066
Joined: Tue Jul 15, 2003 5:13 pm
Location: That little island pritch created.

Post by Nanami »

He means inventory items that do whatever you need. Like, for example, gives you 100 armor when used.
Cyb
Posts: 912
Joined: Tue Jul 15, 2003 5:12 pm

Post by Cyb »

useable inventory limits you to hexen and heretic inventory (and some of those won't work in doom, tome of power for instance) and randy has said that the way inventory is coded in atm makes it not modular enough to add new inventory items (ala decorate)

however, you could make clever use of keyconf and scripts, though they wouldn't really work like the actual inventory. But through keyconf you could bind a key to a script that appears every map (puke 200) and this script would check for a certain variable to see if it should do the specified action, so like

int got_item = 0;
script 200 (void)
{
if(got_item) { give_inventory("Armor", 100); got_item--; }
}

and you'd need to incriment got_item every time the player picked up your faked inventory item (via another script). the main problem with this of course is each inventory item needs a specific key, so you'd prolly want to limit yourself to like 5 or so items (and even that may be pushing it).
User avatar
Nanami
Posts: 1066
Joined: Tue Jul 15, 2003 5:13 pm
Location: That little island pritch created.

Post by Nanami »

Earlier I was thinking of using an item like the give health items and then when a script detects one has been used it takes back the health and does something else.

However, that could be annoying if it takes health you didn't gain in the first place. So I'd also have to record health all the time. I was looking for other items that do almost nothing that I could override but I didn't find much.
User avatar
SargeBaldy
Posts: 366
Joined: Tue Jul 15, 2003 3:49 pm
Location: Oregon

Post by SargeBaldy »

i still don't quite understand what would be so difficult about just adding a DECORATE lump to add new inventory items, and then add a way to make it return something when it's used, which could be used to activate a script... or something like that.

Return to “Editing (Archive)”